Page 1 of 1

Balance parentheses or regexp query

Posted: 2005-07-29 06:39:46
by Kaveh Bazargan
I am an old-time Nisus user (version 1), and happy to be making a return visit!

Is it possible to balance parenthses?

I have expressions like this:

\fmath{{\mathrm{T}}_{2}}

I need a way (preferably with regexp) to select this pattern, which may contain any number of nested braces. It should recognize the last closing brace as the end of the expression.

I remember I used balance parenthesis before, but regexp would be better as it can be embedded in a perl script. Any hints welcome.