Sumitra Paul

Sumitra Paul

  • NA
  • 51
  • 33.7k

getting a matching string (pattern)

Feb 12 2013 7:14 AM

hi,

I have to write an algorithm for getting a matching string from list of saves string
after comparing it with the given string.

say example:

Saved string:

 Book ABC
 Book ABC XYZ
 Note Copy
        Note Book YYY

If user gives Book, then the algorithm can return Book ABC or Book ABC XYZ or Note Book YYY.
if the user gives Book ABC, the the algorithm can return Book ABC or Book ABC XYZ.
if the user gives Book ABC XYZ, the the algorithm should return only Book ABC XYZ.
and so on.

Hope I am able to comunicate.

Have anyone written anything like this earlier or is c# provides any such functionalities?

Regards,


Answers (7)