Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex 使用正则表达式处理配置单元中的特殊字符_Regex_Hive_Special Characters_Hiveql - Fatal编程技术网

Regex 使用正则表达式处理配置单元中的特殊字符

Regex 使用正则表达式处理配置单元中的特殊字符,regex,hive,special-characters,hiveql,Regex,Hive,Special Characters,Hiveql,我有这样的数据 +--------------+--------------+-------------+------------+----------+--------------+-----------------+-----------------+-----------------+-----------------------+---------------------------+----------+ | label | ent | custo

我有这样的数据


+--------------+--------------+-------------+------------+----------+--------------+-----------------+-----------------+-----------------+-----------------------+---------------------------+----------+
|     label    |     ent      |   custom1   |  account   | custom2  |     icp      |   created_by    |   approved_by   |    posted_by    |      date_posted      |        description        | group_1  |
+--------------+--------------+-------------+------------+----------+--------------+-----------------+-----------------+-----------------+-----------------------+---------------------------+----------+
| FB_FR_SE_1�  | 0418 - NORW  | D_ADJ_USD�  | 06D24CLS�  | ACC�     | [ICP None]�  | lbryan46@LDAP�  | lbryan46@LDAP�  | pprzyboc@LDAP�  | 7/5/2019 3:29:00 PM�  | Credit Loss Translation�  | FCEB�    |
我想删除尾部特殊字符


提前感谢。

使用
regexp\u replace

select regexp_replace('FB_FR_SE_1�','�','');
结果:

FB_FR_SE_1

蜂巢是我在这里使用的。如果你确切地知道你想要逃逸的字符是什么,你不需要正则表达式。您可以在所使用的语言中只使用
replace
函数/方法。