现在我要使用 regexp_like 函数来匹配以下规则该怎么写
下面就是我匹配数据的三种格式 数字为11位的0-9任何数字,中间有的有空格
14677777777 *15977777777
“?13118536685 +18704062316?”
10588511731 10927790232
不太明白需求,如果只是这几种形式的话,可以写 where regexp_like(col1,'^[“|?|1]|')
and regexp_replace(regexp_replace(col1,'[*|?|“|”| |+]',''),'[0-9]',0) = 0
and length(regexp_replace(col1,'[*|?|“|”| |+]','')) = 22
第一个正则是限制开头,后两个是正则替换判断是否22位都是数据
具体用法详见 https://blog.csdn.net/weixin_40417658/article/details/78132084