laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Just thought I'd have a go at it myself, using regex instead of the (obviously better) XOR approach.
My rough check, with 1 mismatch, works out to the same order of magnitude as choroba's first try, but maybe 2x slower. With more mismatches, my solution goes exponential creating regexes, but should take a bit less time in the matching phase. (Hand-wavy arguments go here.) Code: <Reveal this spoiler or all in this thread>
-QM In reply to Re: How do you match a stretch of at least N characters
by QM
|
|