1

I am testing Below query but I am getting different results in Oracle 10g and 11g.

Query In 11g:-

select * from  ( select '12-22-2019' dt from dual )
where regexp_like(dt,'(12|^12)[- /.]([1-9]|0[1-9]|[12][0-9]|3[01])[- /.]2019')

Results :- 12-22-2019

Same query In 10g:-

No row returned.

but when I do below query I get same result in both 10g and 11g. i.e. 12-22-2019

select * from  ( select '12-22-2019' dt from dual )
where regexp_like(dt,'(12|^12)[- /.]([1-9]|0[1-9]|[1][0-9]|[2][0-9]|3[01])[- /.]2019')

Can anyone explain why I am getting different results.I am new to oracle and I did google but no success.

  • 1
    Bug. `[12]` is guilty. Very similiar thread and examples on Oracle forum: [link](https://community.oracle.com/thread/399172?start=0&tstart=0). – Ponder Stibbons Jan 10 '20 at 11:45

0 Answers0