in reply to extract regions
If you don't know that the next record is >lmo0027 you can do something like this:use strict; while (<>) { if (/^>lmo0025/ .. /^>lmo0027/) { last if /^>lmo0027/; print; } }
use strict; my ($firstfoundflag, $lastfoundflag); while (<>) { if ($firstfoundflag || /^>lmo0025/) { $firstfoundflag++; if ($lastfoundflag || /^>lmo0026/ ) { $lastfoundflag++; if (/^>lmo(?!0026)/) { last; } } print; } }
--
flounder
|
|---|