Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: RegEx related line split

by Lotus1 (Curate)
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?
[1nickt]: The Google-fu is strong with this one.
[1nickt]: I was looking at Best Buy since like the in-store return/repace plan ... but the 17" HP Envy they have is not this one ....
[1nickt]: May be brand new ... 0 reviews on the site.

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2017-03-26 18:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (315 votes). Check out past polls.