<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Incorrect results from regular expresions from COUNTIF (but not from REGEX)"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=128503#c14">Comment # 14</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Incorrect results from regular expresions from COUNTIF (but not from REGEX)"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=128503">bug 128503</a>
from <span class="vcard"><a class="email" href="mailto:erack@redhat.com" title="Eike Rathke <erack@redhat.com>"> <span class="fn">Eike Rathke</span></a>
</span></b>
<pre>Hard stuff. Though IMHO there is nothing wrong. In general, COUNTIF() and
others for a string criterion follow the setting Tools -> Options -> Calc ->
Calculate, General Calculations, either wildcards, regular expressions, or
none.
However, the first attempt is to convert the string criterion to number, ".0"
=> 0.0 and so on, and if successful the match will not be a regular expression
match but a numeric match. Which when switching to a locale where the decimal
separator is not dot makes it suddenly work. To force regex instead of numeric
use some expression that can not be "misread" as numeric, for example ".[0]" or
".\0" or "(?i).0" (for case insensitive match of the entire expression, which
the default is anyway).
There's not much we can do about this "numeric first" behaviour, it is
expected. And yes, in the different locales context it is awkward. Blame Excel.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>