Skip to Main Content

SQL Developer

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!

4.0.1 Regular Expression replace with capturing groups - regression?

ArpodApr 3 2014 — edited May 6 2014

In version 3.2 it was possible to reference a captured group in the replace string, using \1, \2 etc. It doesn't seem to work anymore in 4.0.1, which is pretty annoying, because I use it often.

Suppose I have the following text:

a bcd efgh ik

I want to prefix every letter with 'a-'. I search for:

([A-z])

and replace it with:

a-\1

In 3.2 I get what I would expect:

a-a a-ba-ca-d a-ea-fa-ga-h a-ia-k

But 4.0.1 doesn't seem to understand the reference:

a-\1 a-\1a-\1a-\1 a-\1a-\1a-\1a-\1 a-\1k

I tried $1 and \\1, also tried turning "Substitute escaped characters" on and off, with no result.

Furthermore, it ignores the last letter, 'k'.

I'm not sure, but I think it worked fine in 4.0.0. I couldn't find any information on regexp replace syntax in the help, either - maybe I'm just doing something wrong?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 3 2014
Added on Apr 3 2014
2 comments
1,909 views