Where do you capture $2? If it's from a previous regex, it won't be available after a successful match that resets the capture variables!
That one bites me too occasionally, which is how I remember.
In reply to Re: Using 'e' in s///
by chromatic
in thread Using 'e' in s///
by talexb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |