{"name":"regexMatch","title":"regexMatch","type":"command","url":"https://community.bistudio.com/wiki/regexMatch","revid":369126,"updated":"2024-09-03T10:34:33Z","groups":["Strings - Regular Expression"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Returns whether the *haystack* matches the *pattern*.","syntaxes":[{"syntax":"haystack regexMatch pattern","params":[{"name":"haystack","type":"String","type_expr":"String"},{"name":"pattern","type":"String","description":"in format regex pattern","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"returns true if match was found, otherwise false"},"form":"binary","left":{"text":"haystack"},"right":{"text":"pattern"}}],"examples":[{"code":["\"I'm a coOkIe clicker\" regexMatch \".*cookie.*\"; // true"]},{"code":["\"I'm a coOkIe clicker\" regexMatch \".*cookie.*/\"; // false, empty flags == case sensitive"]},{"code":["forceUnicode 1;\n\"I'm a coÖkIe clicker\" regexMatch \".*coökie.*\";"]},{"code":["\"Cookie clicker\" regexMatch \"cookie/i\"; // false, pattern does not fully match the haystack"]}],"see_also":["regexFind","regexReplace"]}