Not sure how stable is the file structure, maybe you really should write a parser, as suggests JavaFan, but the following example would work on the given input:
use strict; use warnings; open my $fh, "<", "file.frg"; while(<$fh>) { if (/^{FRG/../^}/){ if (/^acc:(\d+)/) { print ">$1\n"; } elsif ( /^seq:/ ) { while(<$fh>) { last if /^\./; print; } } } }
In reply to Re: Vertical Regex
by zwon
in thread Vertical Regex
by joomanji
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |