in reply to Complicated pattern match
On a related note, I wrote Amino acid sequence builder awhile ago, which doesn't really fit this problem, but you might find it interesting anyway.my $re = join("([wxyz]*)", "", split("", $A), ""); if (my @array = $B =~ /^$re$/) { print "$_\n" for grep length, @array; }
Updated. And the code is tested now. Though due to misunderstanding the problem (clarified in the CB), the "[wxyz]*" should be "[ACTG]*?"
|
|---|