use 5.010; "" =~ /(?<mon>\w+)\s(?<mon>\w+)/; print scalar keys %-; # 0
Now constructing such a string is in general even more difficult than just parsing for named captures labels.
Good idea anyway! :)
Cheers Rolf
In reply to Re^2: How do I extract named variable names from regex string
by LanX
in thread How do I extract named variable names from regex string
by maspsr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |