Click here to Skip to main content
Click here to Skip to main content

Use wildcard characters * and ? to compare strings

, 20 Feb 2012
How about transforming first into a Regex and then let 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) +...
This is an old version of the currently published tip/trick.

This article is still being written and is not currently available for general viewing.

Please go to the String handling Table of Contents to view the list of available articles in this section.
| Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 20 Feb 2012
Article Copyright 2012 by Andreas Gieriet
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid