You're being bitten by the "greediness" of regular expressions. They try to match as much of the string as possible - which, in this case, is all of it.
To make the regex "non-greedy" put a '?' after the greedy part of the regex.
You might also like to take a look at Death to Dot Star!
--Perl Training in the UK <http://www.iterative-software.com>
In reply to Re: Re: Regex To remove text between parentheses
by davorg
in thread Regex To remove text between parentheses
by beretboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |