Bug 161177 - Function EXPREG not escape dot character correctly
Summary: Function EXPREG not escape dot character correctly
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.2.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-19 23:17 UTC by aldrinpdscastro
Modified: 2024-05-21 16:05 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
sample (10.98 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-05-21 01:20 UTC, aldrinpdscastro
Details
sample 2 (10.98 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-05-21 01:26 UTC, aldrinpdscastro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aldrinpdscastro 2024-05-19 23:17:34 UTC
Description:
Function EXPREG don't treat escape dot character correctly in regex.

Steps to Reproduce:
1. Put a cell the value 0.9999
2. In another cell use this formula escaping dot: EXPREG(cell;"[0-9]+(\.[0-9]+)?")

Expected Results:
0.9999


Reproducible: Always


User Profile Reset: No

Additional Info:
If take out the metacharacter to scape and use only dot it is works.
Comment 1 m_a_riosv 2024-05-20 02:23:47 UTC
Please what is your decimal separator '.' or ','

Please attach a sample file, reduce the size as much as possible without private information, and paste the information in Menu/Help/About LibreOffice, there is a copy icon.
Comment 2 aldrinpdscastro 2024-05-21 01:20:56 UTC
Created attachment 194232 [details]
sample

Version: 24.2.3.2 (X86_64) / LibreOffice Community
Build ID: 433d9c2ded56988e8a90e6b2e771ee4e6a5ab2ba
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: pt-BR (pt_BR.UTF-8); UI: pt-BR
Flatpak
Calc: threaded
Comment 3 aldrinpdscastro 2024-05-21 01:23:06 UTC
My decimal separator is ','.
Comment 4 aldrinpdscastro 2024-05-21 01:26:35 UTC
Created attachment 194233 [details]
sample 2

I created other spreadsheet and the bug not appear.
Comment 5 QA Administrators 2024-05-21 03:14:17 UTC Comment hidden (obsolete)
Comment 6 ady 2024-05-21 08:10:43 UTC
REGEX() is a _text_ function.

When you convert (by any of several ways) a numeric value into a text value, you can define whichever "fake decimal separator" you want. With that converted-to-text value, you can use REGEX().

This is not a bug.
Comment 7 m_a_riosv 2024-05-21 16:05:57 UTC
(In reply to aldrinpdscastro from comment #3)
> My decimal separator is ','.

The search for '\,' instead '\.', when there is a number in the cell, not a text as number.