↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Functions / String Functions And Operators

regexp_match

Read the PG 18 manual

Returns substrings within the first match of the POSIX regular expression pattern to the string; see Section 9.7.3.

Reading PG 18current·documented in 11 of 27 versions, 10 to 20

Signatures & examples

regexp_match ( string text, pattern text [, flags text ] ) → text[]
Returns substrings within the first match of the POSIX regular expression pattern to the string; see Section 9.7.3.
regexp_match('foobarbequebaz', '(bar)(beque)') → {bar,beque}
Version history 4
  1. 18 → 19 changed
  2. 14 → 15 changed
  3. 12 → 13 changed
  4. 9.6 → 10 added

Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source