I have a column with a lot of inconsistent strings. Some of them contain a substring with a consistent pattern of '2015mmdd_AB_CD_EFG_(text)_(text)_HIJ'
which I would like to extract. I feel this is a cross over case of regexp and a substring command.
My best approach so far has been a rather ugly
substring(col_name, '........_.._.._..._.+_.+_...')
which does not end the output as desired, rahter the output is like '(...)_HIJ_blablabla'.
How can I effectively combine pattern recognition and substring selection in this case?