See perlretut and Can I use Perl regular expressions to match balanced text?.
But first, think about what you are doing. What you seek to do is not simple. Unless this is a homework assignment, I would reconsider the problem and approach it differently. If you are parsing a known format such as XML or HTML then you should use an existing module. If you are parsing a file you created then you should create it with a tree structure instead.
In reply to Re: Text parsing. Processing scopes and subscopes.
by 1nickt
in thread Text parsing. Processing scopes and subscopes.
by Lana
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |