Description: In older versions of Libreoffice the search and replace in Writer could be a mighty tool to clean up text. But now it has a complete new syntax and is working so bad that it is not usable any more. As example i want to clean a text from the page numbers. Something like ¶ ¶ 3¶ ¶ ¶ The expectation is to search for ^$^$^([:digit:]+)$^$^$ and replace it with nothing. But this does not work! The only thing that is working to replace the side number with ^([:digit:]+)$ But then it is not possible to replace multiple empty lines. ^$^$ is not working! ^${2} is not working! ^${2,5} is not working! So this engine is only usable for silly things ... Steps to Reproduce: Make a text with standalone page numbers like ¶ ¶ 3¶ ¶ ¶ Try to delete them with ^$^$^([:digit:]+)$^$^$ Actual Results: Does not work Expected Results: Normal functionality of an regular expression engine Reproducible: Always User Profile Reset: No Additional Info: Version: 6.2.8.2 Build-ID: f82ddfca21ebc1e222a662a32b25c0c9d20169ee CPU-Threads: 4; BS: Linux 3.16; UI-Render: Standard; VCL: kde4; Gebietsschema: de-DE (de_DE.UTF-8); UI-Sprache: de-DE Calc: CL
Karsten, thank you for reporting the bug. Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ or at least with the actual stable version? Thanks. I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version. Change to RESOLVED WORKSFORME, if the problem went away.
I can try to install it. What's about the suggested Regex in your development version? Why it was possible to work it in the history? In the history \n stands for carriage return and not for a blank line. Why this standards have been altered?
Project uses the ICU lib regex [1], where "^$" is not explicitly defined syntax. But think changes for multiline matching came in at 6.1 with https://gerrit.libreoffice.org/c/core/+/49387 @Justin, Eike? =-ref-= [1] http://userguide.icu-project.org/strings/regexp
It was never possible to search for multiple empty paragraphs with ^$^$ One empty paragraph can be matched with ^$, which anchors an otherwise empty expression to start and end, and is explicitly handled in Writer sw/source/core/crsr/findtxt.cxx FindTextImpl() with bool bChkEmptyPara = ... used in the DoSearch() call. You'll probably also find no regular expression engine that would support ^$^$^([:digit:]+)$^$^$ in the here intended way. Try at https://regex101.com/ The \n also never matched an end of paragraph, but a newline entered with Shift+Enter, and still does. See https://help.libreoffice.org/6.4/en-US/text/shared/01/02100001.html for details.
Yes - not with ^$^$ but with \n\n when i remember correct. I promise it was the time of Libreoffice 5. It was the time the screen rendering was better too. Why changing things that works better in the history? Please - this should not be an attack - just a question to think about.
Also \n\n never worked as an empty paragraphs match, only matching multiple empty lines, i.e. newline entered with Shift+Enter. Just tried with LibreOffice 5.3.7 and even OpenOffice.org 3.3.0
Closing.
Perhaps you were using an extension. A google search indicates that "Alternative dialog Find & Replace for Writer" works very nicely for just this sort of task. https://ask.libreoffice.org/en/question/20265/how-to-replace-multiple-paragraph-markers/
Then this extension will be the solution. Thank you.