REGEXP(Lakehouse v1)
如果字符串 <expr> 与 <pattern> 指定的正则表达式匹配,则返回 true,否则返回 false。
Analyze 语法
Section titled “Analyze 语法”<column>.regexp_match(<pattern>)Analyze 示例
Section titled “Analyze 示例”With an input table of:┌─────────────────┐│ my_clothes │├─────────────────┤│ plaid pants ││ plaid hat ││ plaid shirt ││ shoes │└─────────────────┘
my_clothes.regexp_match('p*')┌───────────────────────────────┐│ my_clothes.regexp_match('p*') │├───────────────────────────────┤│ true ││ true ││ true ││ false │└───────────────────────────────┘SQL 语法
Section titled “SQL 语法”<expr> REGEXP <pattern>SQL 示例
Section titled “SQL 示例”SELECT 'databend' REGEXP 'd*', 'databend' RLIKE 'd*';
┌────────────────────────────────────────────────────┐│ ('databend' regexp 'd*') │ ('databend' rlike 'd*') │├──────────────────────────┼─────────────────────────┤│ true │ true │└────────────────────────────────────────────────────┘