I am trying to use string matching in a winforms application .I would like to match the patterns such as bank will be matched by benk or bamk etc so i cannot use
b.nk because then it will not match bamk , it is to give the user a nearest possible option even if the user types wrongly eg in the spelling correction in most applications (but its not for spelling correction)
some other examples : Valid list : possible ,bank, easy,thanks posible matches possible benk matches bank easi matches easy eassy matches easy Thaks matches Thanks
You need the edit distance not regular expression. Most commonly, the edit operations allowed for this purpose are
The edit distance is the number of operations needed to change a string to another string. The string with small distance is most likely what you want. For example benk will has small edit distance with bank.