regex.is_match(haystack, pattern) returns true if the regex pattern matches anywhere in the haystack string, otherwise false.
regex.is_match(haystack, pattern)
true
false
if haystack is a string and pattern matches anywhere in it, returns true.
haystack
pattern
if haystack is a string and pattern does not match, returns false.
if haystack is not a string, returns null.
null
regex.is_match(message, /error|exception/i)
Last updated 1 month ago
Was this helpful?