note
vinforget
I refined my question a little more. I have a string of letters <code>[ACGTacgtNn]</code> from which I want to find a particular instance of a regexp, let's say:
<code>
/ACCAAC[ACGTacgtNn]{6}CTA[ACGTacgtNn]{1}ATG[ACGTacgtNn]{1,2}GATGTT/
</code>
<br>
I can do this just fine, but what if I want to match the above regexp with a tolerance of 2 mismatches for single characters. Below I have an example:
<code>
$buf =~ m/(A)(C)(C)(A)(A)(C)([ACGTacgtNn]{6})(CTA[ACGTacgtNn]{1})(A)(T)(G)([ACGTacgtNn]{1,2})(G)(A)(T)(G)(T)(T)(?{
print $-[0]," ",scalar@-,"\n";
})(?!)/;
</code>
this will print the position of the match in $buf, followed by 19 (the number of submatches). I want to be able to return a match from 17-19 submathes, not just all 19. Thanks.
Vince
369048
369048