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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

RegExp "NOT IN"

2921435Nov 17 2008 — edited Nov 18 2008
Hello,

From the query given below, I need to do just get "this" [i.e, I need to just replace whatever is NOT "this" to NULL).

when I tried it like given below, it considers "t" "h" "i" and "s" as separate and replaces each and every one of them - can you please help ?


with q1 as
( select 'test_this_23stay_count' str from dual union
select 'say_thisandthat_s13et_count' from dual )
select str,
regexp_replace(str,'[^(this)]','') new_str
from q1

regards,

Raj
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 16 2008
Added on Nov 17 2008
7 comments
6,176 views