my $regex = '\w+(ATG\w*T(AG|AA|GA))\w+';
Going wrong:
c:\@Work\Perl\monks>perl -wMstrict -le "my $inputseq = 'AATGGTTTCTCCCATCTCTCCATCGGCATAAAAATACAGAATGATCTAA'; print qq{'$inputseq'}; ;; my $regex = '\w+(ATG\w*T(AG|AA|GA))\w+'; $inputseq =~ /($regex)/g; print qq{'$1'}; " 'AATGGTTTCTCCCATCTCTCCATCGGCATAAAAATACAGAATGATCTAA' 'AATGGTTTCTCCCATCTCTCCATCGGCATAAAAATACAGAATGATCTAA'
Update: Several small edits for clarity and de-typo-ization.
Give a man a fish: <%-{-{-{-<
In reply to Re: Using Recursion to Find DNA Sequences
by AnomalousMonk
in thread Using Recursion to Find DNA Sequences
by clueless_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |