Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2016-08-30 22:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (423 votes). Check out past polls.