I don't like the idea of leftmost-outermost. That would severely slow the regex engine up if it has to decide whether it should store this capture or not each time it encounters one.
I'm also not that keen on assigning to an implicit hash or array.
That just means that again (as with $1, $2 etc.) I have to test for the value having been captured, and then re-assign it to where ever I want it before I call the next regex. The values captured from the first regex will either be over written (as would be the case if "the next regex" was actually the same one in a loop) or discarded if it is a different regex. The main reason for my wanting named regex captures is to avoid these two problems.
Assigning them directly to where I want them seems simpler and more reliable to me.
In reply to Re:+: my versus our in nested regex
by BrowserUk
in thread my versus our in nested regex
by Len
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |