find
Checks whether a given regex pattern matches any part in the search string.
find(searchString, regex)Parameters#
searchString: Thestringto search withinregex: The regular expression pattern to match withsearchString
Returns#
- A boolean
trueonly if there is at least one match otherwisefalse.
Examples#
assertTrue(find(`That clever animalis a fox`, 'clever[\\s\\S]*fox'))info
Read our notes on regular expression to learn about the regex pattern rules.