This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
REGEXMATCH
Dan Gorman edited this page Nov 29, 2018
·
2 revisions
REGEXMATCH
returns a boolean value determined by whether a provided regex can be matched within a string.
REGEXMATCH(arg1, arg2)
-
arg1
is a string to be searched -
arg2
is the regex pattern to be searched for
Let's say we're given a response with some vehicle information that looks like this:
{
"data":{
"mechanic_reports":{
"vehicle_1":{
"description":"The car was still functional, but had a bad radiator, and was in bad condition."
}
}
}
}
If we want to know whether a specific part has been mentioned,for instance, "radiator" or "radiators":
REGEXMATCH(data.mechanic_reports.vehicle_1.description, "radiator.")
This will return true
, because the regex was matched.