-1

I have below String and I want to remove formatting and keep just column name. Can someone suggest regex for this please?

"XYZ_Col,to_timestamp(CREATE_DT,'yyyyMMdd HHmmss')CREATE_DT,ABC_Col,DEF_Col"

to

"XYZ_Col,CREATE_DT,ABC_Col,DEF_Col"

Thanks in advance

dileepvarma
  • 508
  • 2
  • 7
  • 30

1 Answers1

0

I got the solution.

regexp_extract(regexp_replace(column_name, \"\'\", \"\\\\''\") , '[^)]*$',0)
dileepvarma
  • 508
  • 2
  • 7
  • 30