Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Storing Lines before and After pattern

by ysth (Canon)
on Jan 27, 2004 at 01:09 UTC ( #324328=note: print w/replies, xml ) Need Help??


in reply to Re: Storing Lines before and After pattern
in thread Storing Lines before and After pattern

If there may be multiple occurrences of DOG, you want:
($before, $match, $after) = split /(DOG)/, $poem, 2;
or $after will only include up to the second DOG.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2021-09-24 15:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?