This sounds like the sort of task Parse::RecDescent was created for. (IMHO a regex-based approach is a recipe for pain...) Take a look at Some Parse::RecDescent Tutorials - examples abound in the links therein.
HTH,
In reply to Re: Processing tagged text
by planetscape
in thread Processing tagged text
by diggernz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |