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
In reply to Re: Parsing a Word placed between special characters
by hdb
in thread Parsing a Word placed between special characters
by pillaipraveen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |