regex.is_match()
regex.is_match(haystack, pattern) returns true if the regex pattern matches anywhere in the haystack string, otherwise false.
Returns
if
haystackis a string andpatternmatches anywhere in it, returnstrue.if
haystackis a string andpatterndoes not match, returnsfalse.if
haystackis not a string, returnsnull.
Examples
regex.is_match(message, /error|exception/i)Last updated
Was this helpful?