REGEXP_EXTRACT (Lakehouse v2)
提取第一个与正则表达式模式匹配的子字符串。
Analyze 语法
Section titled “Analyze 语法”func.regexp_extract(<str>, <pattern>[, <group>])Analyze 示例
Section titled “Analyze 示例”func.regexp_extract('price: $42.50', '\\$(\\d+\\.\\d+)', 1)
┌─────────┐│ '42.50' │└─────────┘SQL 语法
Section titled “SQL 语法”REGEXP_EXTRACT(<str>, <pattern>[, <group>])SQL 示例
Section titled “SQL 示例”SELECT REGEXP_EXTRACT('price: $42.50', '\\$(\\d+\\.\\d+)', 1);
┌───────┐│ 42.50 │└───────┘