I don't know if will help you, but Dominus's excellent Higher-Order Perl (freely downloadable here) discusses a solution to a problem similar to yours in section 4.3.2 "Genomic Sequence Generator".
In reply to Re: Understanding a script that looks for mismatches to a regex
by AnomalousMonk
in thread Understanding a script that looks for mismatches to a regex
by onlyIDleft
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |