Rob Hanson wrote: > > Try this... > > # untested > $text =~ s/\[[^\]]+?\]/$1/g; > > [^\]] - means anything but a closing bracket > +? - means 1 or more times (as few as possible)
Hi Rob You're not capturing $1, so you would be replacing them and their contents with 'undef'. (The opposite of what was wanted!) Try this: $text = 'Updating Wellbore Set Keys: [wlbr_id = 1234567890, data_provider_code = MTBL, welltype = OIL]'; $text =~ m/\[([^\]]+)/; $text = $1; print $text, "\n"; **OUTPUT wlbr_id = 1234567890, data_provider_code = MTBL, welltype = OIL HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>