I have a string with delimiter ‘_’, example below
‘AAA_BBB_CCC_DDD_EEE’
I want to trim the first two elements of delimited string. Expected output:
‘CCC_DDD_EEE’
Advertisement
Answer
You should be able to use regexp_substr()
:
select regexp_substr(string, '^[^_]+_[^_]+_(.*)$', 1, 1, 'e')
Or regexp_replace()
:
select regexp_replace(string, ''^[^_]+_[^_]+_', '')