Perl Regexes


$seq="gactgactagctagctagctacgatcgtacgaggaattcgatcgatcggcatcgatcggaattcgtcgatgcatagtcaggaattcgcatgcatca";
print "$seq\n";
while ($seq =~ /[gt]a{1,2}c/g) {
#$seq =~ s/gaattc/GAATTC/ ;
$c++;
$p = pos($seq)-length($&)+1;
print "match $c:$&\t$p\n";
}