hive regexp_extract weirdness

前端 未结 2 1170
清歌不尽
清歌不尽 2020-11-29 06:32

I am having some problems with regexp_extract:

I am querying on a tab-delimited file, the column I\'m checking has strings that look like this:

abc.d         


        
2条回答
  •  离开以前
    2020-11-29 06:44

    I think you have to make 'groups' no?

    select distinct regexp_extract(name, '([^.]+)', 1) from dummy;
    

    (untested)

    I think it behaves like the java library and this should work, let me know though.

提交回复
热议问题