Not a direct answer to your question, but given that this looks vaguely like some sort of genome-y stuff you might check out BioPerl first and see if there's not an off the shelf module that handles whatever this file format is (if it's something standard).
In reply to Re: Simple regular expression that isn't simple
by Fletch
in thread Simple regular expression that isn't simple
by ovo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |