in reply to Re: Anchors, bleh :(
in thread Anchors, bleh :(

Good idea. It reminds me of a similar idea that is at the heart of many parsers. You make your regex of the form (things to be left alone)|(things to mangle), for example:

s{ ( [(] [^()]* [)] ) # Leave text in parens alone | <(\w+)> # Replace <word> with $replace{word} }{ $1 ? $1 : $replace($2) }gex;

- tye