Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Parsing a Word placed between special characters

by hdb (Parson)
on May 02, 2013 at 13:35 UTC ( #1031755=note: print w/ replies, xml ) Need Help??


in reply to Parsing a Word placed between special characters

Having the advantage of the well formatted question, I favor split over regex:

use strict; use warnings; while(<DATA>){ print +( split /\]|\[/ )[1], "\n"; } __DATA__ john[JM]mcgroddy stephen[SG]gomsey yuri[YA]alchenko


Comment on Re: Parsing a Word placed between special characters
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (10)
As of 2014-09-02 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (32 votes), past polls