>perl -wMstrict -le "my $seq = 'xxxTATAATGyyyTatAtAtzzz'; my $box = qr{ (?i) TATA [TA] [TA] [TAG] }xms; ;; my @TATAs; while ($seq =~ m{ ($box) }xmsg) { push @TATAs, [ $1, $-[1], ]; } ;; print qq{matched '$_->[0]' at pos $_->[1]} for @TATAs; " matched 'TATAATG' at pos 3 matched 'TatAtAt' at pos 13
Updates:
In reply to Re: positions of multiple matches
by AnomalousMonk
in thread positions of multiple matches
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |