in reply to
Replacement Regex
You'll need code; famously, regexps won't do balance counting. Finite State Machines vs Push-down Automata.
Comment on
Re: Replacement Regex
In Section
Seekers of Perl Wisdom