Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Parsing a Word placed between special characters

by hdb (Prior)
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1031755]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2016-12-10 17:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (164 votes). Check out past polls.