I am trying to extract a portion of the below string using regexp_extract but am not having any success:
CUST_NEW_ACCOUNTS_LINES_2019-03-03.dat.gz
I want to just get the date portion. On the regex101.com website this seemed to work, but hive is giving me an error message.
regexp_extract(meta_source_filename,'^(?:[^_]+_){4}([^_]+)') file_date
Can someone help me understand what is incorrect here? I am not at all familiar with regexp_extract syntax so have been using another function as a starting point.
Thank you!