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])+' ;