Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: 1 mismatch string matching

by kvale (Monsignor)
on Sep 21, 2003 at 03:43 UTC ( [id://292961]=note: print w/replies, xml ) Need Help??


in reply to 1 mismatch string matching

You can perform approximate matching using the String::Approx module.

If you want to roll your own, try

$what_matched = $1 if $string =~ /\b(\watch|m\wtch|ma\wch|mat\wh|matc\w)\b/;
Replace the  \w with  . or  [a-z], etc., according to what errors you want to accept.

-Mark

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://292961]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-20 03:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found