http://qs321.pair.com?node_id=768154


in reply to Re^2: regular expression help
in thread regular expression help

However, the capturing parentheses are not going to capture everything this way.

That's why I didn't recommend it. Perl's match operator can match extremely complex expressions (the initial purpose of regular expressions) and it can extract data from strings, but it's not so good at doing both at once. (At least not before 5.10. 5.10 added a bunch of tools that might help.)