Assuming a definition per line i.e. not split over multiple lines, then...
use warnings;
use strict;
local $/;
my $data = <DATA>;
while ($data =~ /TATAAT[ACGT]+ATG([ACGT]+)(:?T(:?GA|AA|AG))/cgs) {
warn $1;
}
__DATA__
TATAATATTACAATGGATCATACAGTTAG
TATAATATTACAATGGATCATACAGTTAG
TATAATATT
ACAATGGATCATACAGTTAG
produces:
$ perl tst.pl
GATCATACAGT at tst.pl line 8, <DATA> chunk 1.
GATCATACAGT at tst.pl line 8, <DATA> chunk 1.
$
A user level that continues to overstate my experience :-))
|