match

ReQL command: match

Command syntax

string.match(regexp) → nil/object

Description

Matches against a regular expression. If there is a match, returns an object with the fields:

  • str: The matched string
  • start: The matched string’s start
  • end: The matched string’s end
  • groups: The capture groups defined with parentheses

If no match is found, returns nil.

Accepts RE