|laziness, impatience, and hubris|
Re: Recursive substitutionby grizzley (Chaplain)
|on Nov 10, 2009 at 08:34 UTC||Need Help??|
Is it possible to perform a s///g substitution in such a way that the substituted text is itself recursively parsed?
I don't find any use for it. The way I always think of regexes is
s/find some text/react to this text/somehow;
If you find text, the 'react' part has enough information to build any replace string you want. There you can use another regex (nested) to do something (and I can provide examples if you want). And this can be useful.
But the approach:
s/find some text, replace it, find more text in replaced string/react to second finding/
? Not good: first part of s/// is to find something, second is to replace. For analysing text not for changing it.