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
|
|---|