Alternatives
Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
20 Feb 2012PIEBALDconsult
This is much simpler: fewer new strings created, no recursion. And it allows the caller to specify how to do a string comparison.public static boolWildcardMatch( this string Subject, string Pattern, System.StringComparison...
20 Feb 2012Andreas Gieriet
How about transforming first into a Regex and then letting the Regex do the work? E.g.:public static Regex GetRegex(string wildcard){ string pattern = Regex.Replace(wildcard, @"([^?*]+)?([?*])?", m => Regex.Escape(m.Groups[1].Value) +...
26 Jul 2017PrzemekBenz 3 alternatives
How to use wildcard characters & and ? to compare strings