Yes I know about regular expressions. I have the following method I use:
public static bool IsWildcardMatch(string originalString, string searchString){ if (!searchString.Contains("*")) return false; Regex regEx = new Regex("^" + Regex.Escape(searchString).Replace("\\*", ".*").Replace("\\?", ".") + "$"); return regEx.IsMatch(originalString);}
I need a similar method that will match part of a string (Eg. like String.Contains()) allowing only one "*" and have an "out string wildcardString" parameter that will output what was inside the "*".