Did you try it?
These (??{ $first = 1; }) won't work because they'll include 1,2 or 3 into the regex.
Try (?{ $first = 1; }); with a single ? instead.
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
In reply to Re^3: Regex question - identify which pattern comes first
by LanX
in thread Regex question - identify which pattern comes first
by harangzsolt33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |