Bug 165724 - Regex search never finds text beyond end of paragraph ($)
Summary: Regex search never finds text beyond end of paragraph ($)
Status: RESOLVED DUPLICATE of bug 38261
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.5.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find&Replace-Regex
  Show dependency treegraph
 
Reported: 2025-03-13 17:11 UTC by Walter
Modified: 2025-03-27 23:16 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Walter 2025-03-13 17:11:49 UTC
Description:
I want to search text over multiple lines using regular expressions.
$ matches an end-of-paragraph (Enter).

Previous matches work, for example, [0-9]$ but the search never returns results when the search string is after the paragraph mark. A simple search of: $. or $[a-Z] always returns a "Search key not found"

Steps to Reproduce:
1. Write 2 paragraphs of text
2. Find and Replace -> Find: $. (check regular expressions)
3. "Find Next"

Actual Results:
"Search key not found"

Expected Results:
No text is found


Reproducible: Always


User Profile Reset: Yes

Additional Info:
It should match the end-of-paragraph mark together with the first character of the subsequent paragraph.
Comment 1 Brandon H. 2025-03-14 00:42:16 UTC
Thank you for reporting the bug. I can confirm that the bug is present in

Version: 25.2.1.2 (X86_64) / LibreOffice Community
Build ID: d3abf4aee5fd705e4a92bba33a32f40bc4e56f49
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

and

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Comment 2 m_a_riosv 2025-03-14 01:35:30 UTC
Sorry, but this is not a bug, is a limitation of regex in LO.
https://help.libreoffice.org/latest/en-US/text/swriter/guide/search_regexp.html
please take a look at the end of the page.
"A search using a regular expression will work only within one paragraph. That is, a \n will match a line break within a paragraph."

Resolved as duplicate of the enhancement request.

*** This bug has been marked as a duplicate of bug 159607 ***
Comment 3 V Stuart Foote 2025-03-27 20:54:32 UTC

*** This bug has been marked as a duplicate of bug 38261 ***