hive中正则表达式的使用是比较频繁的,但是比较讨厌的是,正则表达式匹配失败的时候,hive完全不会报错。
原来的写法
SELECT * from ahhs_product_info where product_name NOT RLIKE '([\u4e00-\u9fa5])+' ;
在hive里面正确的写法
SELECT * from ahhs_product_info where product_name NOT RLIKE '([\\u4e00-\\u9fa5])+' ;