Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: end of line anchor in regex

by FunkyMonk (Canon)
on Dec 09, 2007 at 16:20 UTC ( #655967=note: print w/ replies, xml ) Need Help??


in reply to end of line anchor in regex

You can use the /m modifier to make $ match newlines: $text =~ s/hello$//gm;

See perlre for more information


Comment on Re: end of line anchor in regex
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2014-11-01 14:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    If a safe, affordable anti-ageing treatment that extended life indefinitely were to become available, would you take it?



    Results (7 votes), past polls