How to get the below output using regexp_substr
with t as(
select 'APP_CONTACT_INFO' s from dual union
select 'APP_CONTACT' from dual union
select 'APP_CONTACT_TYPE_100200' from dual
)
select
s,
REGEXP_SUBSTR( S,'_[A-Z]{3}',1)
from t;
CON
CONINF
CONTYP100
How to repeat _[A-Z]{3} for every underscore match and concatenate it