美文网首页
关于Hive正则表达式

关于Hive正则表达式

作者: anglia熊 | 来源:发表于2018-01-29 14:07 被阅读0次

正则表达式(Regular Expression)是一种文本模式,包括普通字符(例如,a 到 z 之间的字母)和特殊字符(称为"元字符")。

正则表达式使用单个字符串来描述、匹配一系列匹配某个句法规则的字符串。

Hive转移字符跟Java保持一致

关于正则表达式:

select regexp_replace(categories,'\[|\]','')

  from mart_peisong.fact_package_detail_snap

WHERE dt=20180115

and categories is not null ORDER BY categories

相关文章

网友评论

      本文标题:关于Hive正则表达式

      本文链接:https://www.haomeiwen.com/subject/npsxzxtx.html