REGEXP_EXTRACT
Learn how to use the REGEXP_EXTRACT pattern matching function in PlaidCloud Lakehouse. Extracts the first substring that matches a regular expression pattern.
Extracts the first substring that matches a regular expression pattern.
Analyze Syntax
func.regexp_extract(<str>, <pattern>[, <group>])
Analyze Examples
func.regexp_extract('price: $42.50', '\\$(\\d+\\.\\d+)', 1)
┌─────────┐
│ '42.50' │
└─────────┘
SQL Syntax
REGEXP_EXTRACT(<str>, <pattern>[, <group>])
SQL Examples
SELECT REGEXP_EXTRACT('price: $42.50', '\\$(\\d+\\.\\d+)', 1);
┌───────┐
│ 42.50 │
└───────┘