How can I write a regular expression to keep the part of a string that's
between a pair of square braces? Here's a sample line:
Updating Wellbore Set Keys: [wlbr_id = 1234567890, data_provider_code = MTBL, welltype = OIL]
Maybe:
s/^[^[]]*\[([^[]]+)\][^[]]*$/$1/
Wow, that's plenty ugly.
James
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>