SQL正则表达式抛出状态=42000,代码=40000

SQL正则表达式抛出状态=42000,代码=40000,sql,hiveql,Sql,Hiveql,对于这部分代码,我得到了ParseException第22行:2无法识别表达式规范中“*”、“case”附近的输入(state=42000,code=40000) 有人能帮我吗。regexp看起来不错。这个案子是错误的。应该是这样的: case regexp_extract(network_information,'^([\\w|-]+)[.|;].*',1) then ......... case when regexp_extract(network_information,'^([\\w

对于这部分代码,我得到了ParseException第22行:2无法识别表达式规范中“*”、“case”附近的输入(state=42000,code=40000)
有人能帮我吗。

regexp
看起来不错。这个案子是错误的。应该是这样的:

case regexp_extract(network_information,'^([\\w|-]+)[.|;].*',1) then .........
case when regexp_extract(network_information,'^([\\w|-]+)[.|;].*',1) = 'something'
         then ...
 end
或者像这样:

case regexp_extract(network_information,'^([\\w|-]+)[.|;].*',1) then .........
case when regexp_extract(network_information,'^([\\w|-]+)[.|;].*',1) = 'something'
         then ...
 end