Click here to Skip to main content
13,287,177 members (53,423 online)
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.

You may also be interested in...

Pro
Pro
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.171207.1 | Last Updated 20 Feb 2012
Article Copyright 2012 by Andreas Gieriet
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid