MatchPattern Function

Syntax

Boolean MatchPattern(String string, String stringPatternToMatchFor, [Boolean ignoreCase = False], [Out] [Array of String subPatterns])

Return Value

Boolean

True if a string matches the pattern. False if otherwise.

Purpose

This function checks if the string matches the regular expression pattern.

Parameters

string as String

The string to compare against a pattern.

stringPatternToMatchFor as String

The regular expression pattern to match.

Note The regular expression pattern follows the standard ECMAScript grammar. Refer to the Microsoft documentation for regular expressions for more information.

ignoreCase as Boolean

(Optional) A Boolean that specifies whether to ignore character case when searching. The default is False.

of String subPatterns as Array

(Optional) An empty array of strings in which the function stores the sub-patterns.