Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Regexp_substr

Oracle_MonkeyJan 18 2016 — edited Jan 22 2016

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

This post has been answered by BluShadow on Jan 21 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 19 2016
Added on Jan 18 2016
19 comments
4,877 views