Is there a reason you don't want to use a proper parser, specifically designed for this task, and the other tasks you're trying to achieve?
In reply to Re: regex in perl
by marto
in thread regex in perl
by bigup401
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |