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!

Reg : Regexp's back reference --

915396Dec 26 2012 — edited Dec 30 2012
Hi Experts,

I've got some doubt regarding the '\1' Back Referencing :
with xx as(
  select 'today (12)123 is the (45)456 wednesday' str from dual
)
select regexp_substr(str,'(\([[:digit:]]{2}\))') from xx; 
gives
(12)
How can i modify it to get both - '(12)' and (45) as output?
Could you please explain me how this technique 'Back Referencing' works. Any examples...

My Database version :
Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
PL/SQL Release 11.2.0.2.0 - Production
"CORE	11.2.0.2.0	Production"
TNS for 32-bit Windows: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
Help highly appreciated. Thanks.
Ranit B.
This post has been answered by Frank Kulash on Dec 26 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 27 2013
Added on Dec 26 2012
25 comments
2,095 views