Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: RegEx related line split

by Lotus1 (Deacon)
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 studying the Monastery: (5)
As of 2016-06-25 10:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (324 votes). Check out past polls.