Description
Returns whether the haystack matches the pattern.
Syntax
haystack regexMatch pattern
Parameters:
haystack: Stringpattern: String - in format regex pattern
Returns: Boolean - returns true if match was found, otherwise false
Examples
Example 1
"I'm a coOkIe clicker" regexMatch ".*cookie.*"; // true
Example 2
"I'm a coOkIe clicker" regexMatch ".*cookie.*/"; // false, empty flags == case sensitive
Example 3
forceUnicode 1;
"I'm a coÖkIe clicker" regexMatch ".*coökie.*";
Example 4
"Cookie clicker" regexMatch "cookie/i"; // false, pattern does not fully match the haystack