The easiest way is to change your .* to be an appropriate negated character class or to use the ? modifier on the greedy * to make it less greedy.
See the documentation in perlre and perlrequick and perlretut
In reply to Re: regex matches more than I want
by duff
in thread regex matches more than I want
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |