Skip to Main Content

Oracle Database Discussions

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!

Likely a bug in fn:matches implementation

Alex VolodkoNov 21 2023

Hi!

I am about to migrate the code from using ora:matches to fn:matches and identified following inconsistency:

select xmlquery('ora:matches("Test 123", "^\D*$", "i")' returning content) from dual; --returns false 
select xmlquery('fn:matches("Test 123", "^\D*$", "i")' returning content) from dual; --returns true 
select xmlquery('matches("Test 123", "^\D*$", "i")' returning content) from dual; --returns true

I can't figure out why fn:matches returns true in this case. It's seems to me like a bug. Or can anyone please explain to me why its behave differently?

I am using oracle 19c.

Comments
Post Details
Added on Nov 21 2023
3 comments
210 views