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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://655967]
help
Chatterbox?
[ambrus]: 1nickt: hmm. that's not my experience. I would have to pay extra for choosing a seat, but I still don't usually get into a middle seat.

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2017-12-18 13:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (487 votes). Check out past polls.

    Notices?