udaya726
udaya726

Reputation: 1020

REGEX_REPLACE not working as expected in oracle 10g

I am using REGEX_REPLACE method in the Oracle 10g but it is not replacing the strings.

Here is what I'm (unsuccessfully) trying:

Select REGEX_REPLACE('Mathew, Sajan K ext (E IT S US 1)','\\([^\\)]+\\)','') "REGEXP_REPLACE"

Upvotes: 1

Views: 230

Answers (1)

ohaal
ohaal

Reputation: 5268

Try this:

Select REGEX_REPLACE('Mathew, Sajan K ext (E IT S US 1)','\([^\)]+\)','') "REGEXP_REPLACE"

Notice that I just removed the extra escape characters \, some languages seem to require you to double escape, some don't.

Ref: Oracle SQL Database Reference REGEX_REPLACE

Upvotes: 2

Related Questions