Skip to content

#isRegexMatch

Returns true if a string matches the provided regular expression, false otherwise.

#isRegexMatch(value, pattern)
Category StringsValid in Property value
Name Type Description
value path | string The string to test.
pattern string A .NET regular expression.

boolean

source.json
{
"code": "abc123"
}
transformer.json
{
"result": "#isRegexMatch($.code, '^[a-z]+[0-9]+$')"
}
output.json
{
"result": true
}

Try it in the playground →

#regexReplace