In the general case, it's hard to do (just think of curlies within comments or string literals, for instance...). But in simple, clearly circumscribed contexts, you might be able to get away with Text::Balanced, for example (instead of a 'real' parser).
In reply to Re: a question about re
by Eliya
in thread a question about re
by SonicWang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |