Click here to Skip to main content
11,577,522 members (39,578 online)
Click here to Skip to main content

Use wildcard characters * and ? to compare strings

, 20 Feb 2012 CPOL 4.2K 2
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...

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150603.1 | Last Updated 20 Feb 2012
Article Copyright 2012 by Andreas Gieriet
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid