Oihana PHP Arango

isMatch.php

Table of Contents

Functions

isMatch()  : string
Returns an AQL expression that checks if the left string matches the right regular expression.

Functions

isMatch()

Returns an AQL expression that checks if the left string matches the right regular expression.

isMatch(mixed $leftOperand, mixed $rightOperand) : string

Equivalent to the ArangoDB =~ regular expression match operator.

Example:

  • "foo" =~ "^f[o].$" returns true
  • "bar" =~ "^f[o].$" returns false
Parameters
$leftOperand : mixed

The string value or expression to test.

$rightOperand : mixed

The regular expression pattern.

Tags
example
echo isMatch('"foo"', '"^f[o].$"');
// "foo" =~ "^f[o].$"

echo isMatch('doc.name', '"^[A-Z].+"');
// doc.name =~ "^[A-Z].+"
see
https://docs.arangodb.com/stable/aql/operators/#array-comparison-operators
since
1.0.0
author

Marc Alcaraz

Return values
string

The AQL predicate string.

On this page

Search results