StringExtensionsToWildcardsRegex Method

Converts the passed string to a Regex that matches wildcard characters (? and *).

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 7.2.0
C#
public static Regex ToWildcardsRegex(
	this string s
)

Parameters

s  String
The string containing possible wildcard characters.

Return Value

Regex
A Regex instance that matches the pattern of the given string in s.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also