Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: regex with /s modifier does not provide the expected result

by choroba (Cardinal)
on Aug 31, 2016 at 14:10 UTC ( [id://1170898]=note: print w/replies, xml ) Need Help??


in reply to regex with /s modifier does not provide the expected result

It works for me. Are you sure you send both the lines to the subroutine? If so, consider renaming the $line variable, as it can contain multiple lines.

Also, are you sure the class name should contain any whitespace following it? I'd move the \s+? outside the capture group.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: regex with /s modifier does not provide the expected result
by hunagyp (Initiate) on Aug 31, 2016 at 14:43 UTC
    Thank you, you are totally right - it's a shame for me, that I overlooked this. The $line variable did not contain the rest of the text... And on your second sentence: yes, I saw it but I wanted to take care of it later. Anyway, thanks for the heads up! :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1170898]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-25 17:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found