Just another Perl shrine | |
PerlMonks |
Re^7: Longest common substring with N mismatchesby LanX (Saint) |
on Sep 11, 2017 at 17:17 UTC ( [id://1199140]=note: print w/replies, xml ) | Need Help?? |
Looks like the same solution fits, xor both strings at different positions and count the longest runs of zeros tolerating n non zeros in between, probably with a composed regex. See ^ in perlop#Bitwise-Or-and-Exclusive-Or
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|