Re: Search for best matched portion of a string

From: Anil (anilby_at_gmail.com)
Date: 12/31/04


Date: 30 Dec 2004 22:11:30 -0800

Chris,

Let me write down the req. :
- Inputs are 2 strings that have words(variable number of words)
- the string search shud be case sensitive
- the given strings contain alpha-numeric chars(plain text) and no
special chars

- if the input is
string1="Unix Shell programming by Kernighan and Pike"
string2="Unix Shell programming by Pike"

output shud be "Unix Shell programming by"

- if the input is
string1="Unix Shell programming by Kernighan and Pike"
string2="Unix Shell by Pike"

the output shud be
"Unix Shell by"

- if the input is
string1="Unix Shell programming by Kernighan and Pike"
string2="Shell programming by Kernighan"

the output shud be ...
"Shell programming by Kernighan"

Hope I am clear now