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_count is giving wrong count

Pritam DasOct 27 2022

Hi Expert,
I'm trying to get number of dots in a particular string .below is my sql query where it is returning me count as 11
select regexp_count('23.78.86.87','.') from dual;
O/p -11

However if i use the below query to count comma it's giving me correct output
select regexp_count('23,78,86,87',',') from dual;
o/p-3

Appreciate your support.

Thanks,
Pritam

This post has been answered by Frank Kulash on Oct 27 2022
Jump to Answer

Comments

Post Details

Added on Oct 27 2022
12 comments
747 views