I am trying to find and replace a string when someone inputs it as a search query if they should misspell the code, for example Z0000ECEL is written as Z000ECEL it would replace it to be Z00+ECEL, this is so it finds the closest code to this and find it still even if they misspell it, I am currently using:
if (Regex.IsMatch(searchWords[0], "^[a-z]+z00+", RegexOptions.IgnoreCase))
{
Regex.Replace(searchWords[0], "[0]+", "*0", RegexOptions.IgnoreCase);
}
I do not want to place a wildcard at the start of the string as this will bring back to many results.