Skip to main content

regexp2.match(comparisonString)

Determines whether the target regular expression matches the whole of the passed string

Availability

Agent

Parameters

Name Type Description
comparisonString String A string against which the regular expression is matched

Returns

Bool — true if the target regular expression generates a match, otherwise false

Description

This method returns true if the target regular expression generates a match against the string passed as a parameter, or false if there is no match.

Example Code