SQL Language (MOSC)

MOSC Banner

REGEXP_COUNT Strange behavior or bug

edited Apr 23, 2013 1:55AM in SQL Language (MOSC) 8 commentsAnswered
Dear colleagues,
  Can please anyone confirm that there are a bug and provide the reference to MetaLink or explain such REGEXP_COUNT() function behavior ?


SQL> select * from v$version;
 
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
 
SQL> select regexp_count(chr(10)||chr(10)||chr(10)||chr(10)||chr(10)||'A', '^') start_count from dual;
 
START_COUNT
-----------
          6
 
SQL> select regexp_count(chr(10)||'a'||chr(10)||chr(10)||chr(10)||chr(10)||'A', '^') start_count from dual;
 
START_COUNT
-----------
          2
 
SQL> select regexp_count('a'||chr(10)||chr(10)||chr(10)||chr(10)||'A', '^') start_count from dual;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center