Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Disambuating $ in (especially /m) regexps

by ikegami (Patriarch)
on Jan 06, 2016 at 18:41 UTC ( [id://1152103]=note: print w/replies, xml ) Need Help??


in reply to Disambuating $ in (especially /m) regexps

/foo$.*^bar/ms - is this $. (the variable) or EOL followed by random stuff?

$ perl -E'say qr/foo$.*^bar/ms' (?^ums:foo*^bar)
It's the variable. Fixed:
$ perl -E'say qr/foo(?:$).*^bar/ms' (?^ums:foo(?:$).*^bar)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-03-29 09:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found