Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 chilling in the Monastery: (13)
As of 2014-07-30 11:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (230 votes), past polls