On 29/08/2007, Nicholas Cole nicholas.cole@gmail.com wrote:
But it would still be nice to search and replace matching things....
You can, using the recursion feature of Onigurama regular expressions.
For your footnote example, search for the following regular expression:
(?x: \footnote{ (?<balanced> ( [^{}] | {\g<balanced>} )* ) } )
being careful *not* to put a newline after the final parenthesis, and replace with
($1)
I've tested this, and it seems to work.
Robin