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

Re: read multiple lines

by Punitha (Priest)
on Nov 13, 2008 at 09:51 UTC ( #723392=note: print w/ replies, xml ) Need Help??


in reply to read multiple lines

Hi

If you want the content in between 'begin' and 'end process' means try like this,

use strict; my $string ='hfkjd process jhk start begin output1 output2 end process scrap hkl process khfk shoot hooter begin output3 end process'; while($string=~/\bbegin((?:(?!end process).)*)end process/sg){ print "IN:$1\n"; }

or tell us clearly what you really need and what you tried so far?

Punitha


Comment on Re: read multiple lines
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2015-07-04 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls