Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Oracle regexp_replace default replace string

I have a simple question I cant find the answer for:

Is this:

regexp_replace(somecolumn, someregex) 

The same as the following?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

regexp_replace(somecolumn, someregex, NULL) 

>Solution :

Yes, they’re the same. The documentation for REPLACE is more explicit about this behavior:

If replacement_string is omitted or null, then all occurrences of search_string are removed.

But REGEXP_REPLACE behaves the same way. The third argument replace_string replaces whatever matches the pattern; if it’s omitted or null, all matching parts of the string are removed.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading