++ for the code with the symbolic references, but the OP specifically wanted to have lexical variables ("my"). Is it at all possible to have symbolic references to lexical variables?
<nitpicking mode="off">
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In reply to Re: Re: regex issue
by CountZero
in thread regex issue
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |