Bug 168323 - Find "$" matches pass "\r"
Summary: Find "$" matches pass "\r"
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0 all versions
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find&Replace-Regex
  Show dependency treegraph
 
Reported: 2025-09-08 18:17 UTC by fpy
Modified: 2025-09-09 02:13 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
input file (8.23 KB, application/vnd.oasis.opendocument.text)
2025-09-08 18:17 UTC, fpy
Details
result screenshot (32.97 KB, image/png)
2025-09-08 18:20 UTC, fpy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fpy 2025-09-08 18:17:54 UTC
Created attachment 202750 [details]
input file

to reproduce :
- open attached ODT
- Edit > F&R
- Find : "\d$"
-> "Find All"

Current : finds line 1 and 4

Expected : finds line 4


note: \d.$ doesn't find anything
Comment 1 fpy 2025-09-08 18:20:02 UTC
Created attachment 202751 [details]
result screenshot
Comment 2 Kamil Landa 2025-09-08 19:28:02 UTC
Confirmed


Version: 25.8.1.1 (X86_64)
Build ID: 54047653041915e595ad4e45cccea684809c77b5
CPU threads: 8; OS: Windows 10 X86_64 (build 17763); UI render: Skia/Raster; VCL: win
Locale: cs-CZ (cs_CZ); UI: cs-CZ
Calc: CL threaded


Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6d020f728b573c8c33929f8c494f9b748f576fe5
CPU threads: 8; OS: Windows 10 X86_64 (build 17763); UI render: Skia/Raster; VCL: win
Locale: cs-CZ (cs_CZ); UI: cs-CZ
Calc: CL threaded
Comment 3 V Stuart Foote 2025-09-09 02:13:18 UTC
Seem to have an implementation issue with the ICU Regular Expressions.

The \d\R matches the new lines, but the \d with our LO specific $ paragraph end regex gets misinterpreted.

None of these treat the $ as our paragraph end:

\d$

\d+$

\d?+$

\d{1}+$

Does our $ regex get mixed with ICU handling. Doesn't seem to be a recent regression, same behavior at 6.4.7 release; but we weren't on ICU regex at 3.6.7 so the \d not matched.