In addition to named capture groups, already suggested, there are \gn and \g{n} relative numbered capture group backreferences, where n may be negative or positive.
But I agree that the problem of having users define regexes using any regex construct under the sun and then be able to combine these pieces together in ways that will still "Do What You Want" is formidable. I think that, in the end, you will have to impose (substantial) limitations on what users can define. And yes, please give us some reasonable examples!
Give a man a fish: <%-(-(-(-<
In reply to Re: Is there an easy way to parse and modify regular expressions programmatically
by AnomalousMonk
in thread Is there an easy way to parse and modify regular expressions programmatically
by DrWhy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |