Why in some cases number of start-of-string anchors is not equal to number of end-of-string anchors?
regexp_count(chr(10)||'A'||chr(10)||'B', '^') = 2
regexp_count(chr(10)||'A'||chr(10)||'B', '$') = 1
UPD :
In multi-line mode disbalance has opposite direction:
regexp_count(chr(10)||'A'||chr(10)||'B', '^', 1, 'mn') = 1
regexp_count(chr(10)||'A'||chr(10)||'B', '$', 1, 'mn') = 3
fiddle
After investigation Oracle Support concluded that this issue is a bug.
Bug 16707134 : REGEXP_COUNT PATTERN '^' AND NEW LINE UNEXPECTED BEHAVIOR
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With