[Libreoffice-bugs] [Bug 128503] Incorrect results from regular expresions from COUNTIF (but not from REGEX)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Nov 4 13:45:35 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=128503

--- Comment #14 from Eike Rathke <erack at redhat.com> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20191104/4dacf419/attachment.html>


More information about the Libreoffice-bugs mailing list