rani has asked for the wisdom of the Perl Monks concerning the following question:

How do I match two strings with some mismatches. For example one string is like N[^P]{2,4}[S|T]. I have to search this string in someother string with 1 or 2 mismatches. How to get this?

2002-07-09 Edit by Corion : Added CODE tags

Replies are listed 'Best First'.
Re: pattern matching
by PodMaster (Abbot) on Jul 10, 2002 at 11:28 UTC
Re: pattern matching
by Armos (Scribe) on Jul 10, 2002 at 12:12 UTC
    The above links are certainly worth reading. Asking a well formed, properly supported question is important. It saves the monk reading your post time and confusion, and improves the quality of the replies you will receive. This saves both you and the monks that peruse your question time. We all like saving time ;)

    As for your question, I'm not certain what you are asking, but you might consider String::Similarity. It will provide you with an estimate of the difference between the two strings. I'm not terribly familiar with the module, so I can't offer much more than to point you in the direction of it.