Skip to main content
Scalar function
Returns NULL if value or pattern is NULL. A NULL group index can make all results NULL; use a non-NULL constant index.

Syntax

Scalar

Arguments

Returns

  • Type: STRING
  • Possible values: Matching capture text; an empty string when nothing is captured.
  • NULL behavior: Returns NULL if value or pattern is NULL. A NULL group index can make all results NULL; use a non-NULL constant index.

Properties

Examples

Typical behavior

Default capture group and full match

Limitations

  • Use a constant capture-group index. A group column is not evaluated independently for each row.
  • Invalid regular expressions raise an error.
  • Negative or out-of-range group indexes return an empty string.
Last modified on October 15, 2026