in reply to Re: Finding a _Similar_ Substring? (Fuzzy Searching?)
in thread Finding a _Similar_ Substring? (Fuzzy Searching?)
Since in this type of situation I'd normally expect the one pattern to be matched against many strings, I'd usually aim to approach this instead by modifying the regexp:
my @ignore=(' ','-'); #whatever my $ignoreclass = sprintf '[%s]', join '', map quotemeta, @ignore; $re = join $ignoreclass, split //, $re;
Of course this is only so simple if the initial pattern is a simple string: a full-on regexp is rather more difficult to introduce such modifications to reliably.
Hugo
|
|---|