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_REPLACE works with multiple patterns?

CGomesNov 25 2013 — edited Nov 25 2013

Hi, im trying to do someting like this:

with t as (

  SELECT '29-02-2032' dt,'^(\d{2})(\d{2})(\d{4})$|^(\d{2})-(\d{2})-(\d{4})$' er, '\3\2\1' rep FROM dual

)

select regexp_replace(t.dt,t.er, t.rep) from t;

According to the documentation should not be an impediment to use multiple patterns. However, this always returns NULL.

Any ideas?

Thank you.

This post has been answered by CGomes on Nov 25 2013
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 23 2013
Added on Nov 25 2013
5 comments
7,061 views