in reply to extract regions

Let's say you want from >lmo0025 to >lmo0026 inclusive. If you know that the next record will be >lmo0027 you can do something like this:
use strict; while (<>) { if (/^>lmo0025/ .. /^>lmo0027/) { last if /^>lmo0027/; print; } }
If you don't know that the next record is >lmo0027 you can do something like this:
use strict; my ($firstfoundflag, $lastfoundflag); while (<>) { if ($firstfoundflag || /^>lmo0025/) { $firstfoundflag++; if ($lastfoundflag || /^>lmo0026/ ) { $lastfoundflag++; if (/^>lmo(?!0026)/) { last; } } print; } }

--

flounder