Thanks ! These are pretty cool (I could see come use for them in my work), but I'm looking for something which I could use a regexp:
$str = "PolarBear";
$str =~ /[Pp]olar[Bb]e[ae]r/;
if $str is "polarbear" or "polarbeer" or "Polarbear" returns 0
if $str is "PolarBeat returns 1
if $str is "PelarBeat returns 2
etc,etc.
| [reply] [d/l] |
Ah, I see. (Also didn't realize that String::Approx doesn't use regexes)
So this is crazy, but it just might work: stick each letter of one string into one array, then each letter of the other string into the other array. Then use List::Compare to figure out how the two strings are different.
List::Compare is my favorite hammer these days. =)
| [reply] |
cool. This seems like a generalized way to go about it. Hope the performance is ok. I need to compare a 27 character reg-exp to a 1 million character string !
vince
| [reply] |