Skip to main content



IsWildcardMatch Function

Determines if an expression matches an DOS-style wildcard expression.

Syntax 1

IsWildcardMatch(string, pattern)

Determines if an expression matches an DOS-style wildcard expression.

Arguments

string String - A string.

pattern String - A DOS-style wildcard pattern (*, ? wildcards).

Syntax 2

IsWildcardMatch(string, pattern, caseSensitive)

Determines if an expression matches an DOS-style wildcard expression.

Arguments

string String - A string.

pattern String - A DOS-style wildcard pattern (*, ? wildcards).

caseSensitive Boolean - True to be case-sensitive in the wildcard pattern.

Remarks

Example:

IsWildcardMatch("Abcdefzx", "a\*z?"); // returns true

Example:

IsWildcardMatch("abcdefzx", "a\*z?", true); // returns true