Hive 使用regexp\u Extract函数在配置单元中提取三个引号内的字符串

Hive 使用regexp\u Extract函数在配置单元中提取三个引号内的字符串,hive,Hive,我在配置单元表中有一个字符串列 """hello:world""" """abc:|:def""" 我只想提取三重引号中的文本,如下所示 hello:world abc:|:def 如何在配置单元中使用regexp\u extract函数来执行此操作 我在努力 select '"""hello:world"""' as in , regexp_extract('"""hello:world"""','""".*."""' , 0) as out ; 这可以使用regexp\u repla

我在配置单元表中有一个字符串列

"""hello:world"""
"""abc:|:def"""
我只想提取三重引号中的文本,如下所示

hello:world
abc:|:def
如何在配置单元中使用regexp\u extract函数来执行此操作

我在努力

select '"""hello:world"""' as in , regexp_extract('"""hello:world"""','""".*."""' , 0) as out ; 
这可以使用regexp\u replace和regexp\u extract来完成。对于regexp_extract,解决方案假定字符串模式是一致的

select regexp_replace(col,'"',''),regexp_extract(col,'"""(.*)"""',1)
from tbl