ContainsStrRegex
Copied!
ContainsStrRegex( value, pattern )
Description
The ContainsStrRegex
function returns true
when the value
string
matches the pattern
regular expression, or false
when it does not.
Returns
Returns a boolean: true
when value
matches the pattern
regular
expression, or false
when it does not.
Examples
The following query demonstrates the case where the value
string
matches the pattern
regular expression:
Copied!
client.query(
q.ContainsStrRegex('Fauna', '(Fa|na)')
)
.then((ret) => console.log(ret))
true
The following query demonstrates the case where the value
string
does not match the pattern
regular expression:
Copied!
client.query(
q.ContainsStrRegex('Fauna', '.Faa*')
)
.then((ret) => console.log(ret))
false
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!