Click or drag to resize

TextUtilsWildcardToRegex Method

Converts a wildcard string pattern ('*' and '?' wildcards) into a regular expression.

Namespace:  PDTec.IceNet.Sdk.Utils
Assembly:  PDTec.IceNet.Sdk (in PDTec.IceNet.Sdk.dll) Version: 7.2.0.0 (7.2.7583.15464)
Syntax
C#
public static string WildcardToRegex(
	string pattern
)

Parameters

pattern
Type: SystemString
The wildcard string pattern.

Return Value

Type: String
The regular expression.
Examples

The example shows how to use the WildcardToRegex(String) method.

Regex regex = new Regex(StringUtils.WildcardToRegex(keyPattern));

if (regex.IsMatch(textToTest))
{
    // textToTest matches the wildcard pattern...
}
See Also