Skip to Main Content

Feedback

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

maybe there is a mistake in oracle doc

five smallMar 4 2024

Recently I learned oracle function, i found different result between doc and my local test.AT

SQL Language Reference → 7.function → REGEXP_COUNT → Examples

We will see :

In the following example, REGEXP_COUNT validates the supplied string for the given pattern and returns the number of alphabetic letters followed by a single digit number only at the beginning of the string:

select regexp_count('ABC123', '[A-Z][0-9]'), regexp_count('A1B2C3', '[A-Z][0-9]') from dual;

REGEXP_COUNT('ABC123','^[A-Z][0-9]') REGEXP_COUNT('A1B2C3','^[A-Z][0-9]')
------------------------------------ ------------------------------------
0 1

I think it's a wrong answer

This post has been answered by BluShadow on Mar 4 2024
Jump to Answer
Comments
Post Details
Added on Mar 4 2024
4 comments
139 views