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!

How to get the opposite(not true) of a pattern using Regexp_replace

sgalaxyMar 19 2008 — edited Mar 19 2008

Hi,
In the following simple sql query....all occurences of 'a' are replaced by the next character...

SQL> select regexp_replace('Palaio Faliro','[a]{1}') from dual;
 
REGEXP_REPLACE('PALAIOFALIRO',
------------------------------
Plio Fliro

Is it possible to get the opposite of this pattern... namely except for the 'a' character , all others to be replaced by their next character in the above string....
So , to get....aaa(i think... as only the 'a' character is not going to be replaced...)

Thanks...
Sim

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 16 2008
Added on Mar 19 2008
2 comments
1,154 views