Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: RegEx related line split

by Lotus1 (Chaplain)
on Nov 11, 2011 at 21:58 UTC ( #937675=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $RefLine = "(a) This is first line. (b) This is second line; (c) Th
    +is is different line 32. (d) Here is the last line.";
    
    @lines = $RefLine =~ /(\([a-z]\).*?)(?=$|\([a-z]\))/g;
    print ">>$_<<\n" foreach @lines;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2015-04-26 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who makes your decisions?







    Results (488 votes), past polls