Description: Copying text from a file and placing it in search should ALWAYS then result in a successful search, that finds the copied text. It does not in LibreOffice Writer if the copied text includes a paragraph return mark, even if View is set to show these marks. It is an insanely annoying bug because it is especially things like line endings that are difficult to code for a search due to inconsistent use across apps of how to show a paragraph mark - depending on the app it might be $, \r, ^p or something else. Steps to Reproduce: The use case here is, for a YouTube transcript, replace the paragraph mark before the timecode with a space. In doing that, I encountered a general problem with Find. 1.Write something with a few paragraph marks like this (copied from a YouTube Transcript): whenever I use these systems, I always feel myself yearning for more artistic 0:55 control. I want to specify the pose for these characters. 2. For clarity on the problem setup, in the above, there should be a paragraph return before and after the 0:55. In LibreOffice Writer, enable View of Formatting Marks. The text should show paragraph marks shown at the end of each line (i.e. after 'artistic' and after '0:55'.) No other formatting marks appear in the document. 3. Select and then copy the following text in 1: artistic 0:55 control 4. Open Edit - Find and Replace. Click Regular Expressions. Paste the copied text in the Find box. Note it does not show the paragraph marks. 5. Press Find Next. Note that it will not find the phrase (search key not found). 6. Put $ in for the paragraph marks in the pasted text in the Find box (i.e. after artistic and after 0:05, so we now have in the Find box: artistic$0:55$control Press Find Next. Note that it will not find the phrase (search key not found). 7. Put $[0-9] in the Find field. Press Find Next. Note that it will not find the phrase (search key not found). Actual Results: See 4., 5., 6., and 7. above. Expected Results: 4. I expected it to show the paragraph marks using the special search code for paragraph marks, so I could hit Find Next and it would find the copied text in the document, without me having to make any changes to the text pasted in the Find box 5. I expected it to find the phrase in the document. 6. I expected there to be no need to manually add special codes to be able to find the copied text. I also expected - in its current form where I need to add special codes - that once I add the special code for paragraph mark ($), it will find the copied text in the document. 7. I expected it to find target (0:55) in the document. Reproducible: Always User Profile Reset: No Additional Info: See "expected Results". LibreOffice help was not helpful.
Please attach a sample file, with indication from where to copy the text to search.
Created attachment 184800 [details] Step 1: Go to YouTube transcripts This is a different YouTube transcript than in the bug report but shows the same issue. Step 1: Go to YouTube transcripts by clicking the three dots to the right of Download.
Created attachment 184801 [details] Step 2: Select some or all of the transcript. Step 2: Select some or all of the transcript.
Created attachment 184802 [details] Step 3: Right click and copy it. Step 3: Right click and copy it. (This is with Chrome on Linux BTW.)
Created attachment 184803 [details] Step 4: Open LibreOffice Writer and a new document and paste as unformatted text. Step 4: Open LibreOffice Writer and a new document and paste what we copied as unformatted text.
Created attachment 184804 [details] Step 5: It should look like this. If not, enable view of paragraph marks. Step 5: It should look like this. If not, enable view of paragraph marks.
Created attachment 184805 [details] Step 6: Select a few lines including a time stamp. Step 6: Select "even against the whole world, 0:06you were not".
Created attachment 184806 [details] Step 7. Copy the selected text. Step 7. Copy the selected text.
Created attachment 184807 [details] Step 8: Open Find & Replace, and paste the text segment in the find box Step 8: Open Find & Replace, and paste the text segment in the find box
Created attachment 184808 [details] Step 9: Press Find Next. Step 9: Press Find Next. It returns "Search key not found" despite the search key being a direct copy-paste from the text.
Created attachment 184809 [details] Step 8: Open Find & Replace, and paste the text segment in the find box. Step 8: Open Find & Replace, and paste the text segment in the find box.
Created attachment 184810 [details] Step 9: Press Find Next. Step 9: Press Find Next. It returns "Search Key Not Found" even though it was a direct copy of the text from the document.
Created attachment 184811 [details] Step 10: Under "Other Options" select "Regular expressions" and then click Find Next. Step 10: Under "Other Options" select "Regular expressions" and then click Find Next. It still returns "Search key not found". (I know, this is not a regular expression - not yet. Stay tuned.)
Created attachment 184812 [details] Step 11: Put $ where the paragraph marks are in the original document and press Find Next. Step 11: Put $ where the paragraph marks are in the original document. Make sure "Regular expressions" are enabled under "Other options". Now press Find Next. It still returns "Search key not found."
Basically, this is a fundamental limitation of the built-in Find & Replace tool, that it only searches *in the bounds of a single paragraph* at any moment. One can't search for anything spanning across several paragraphs.
Thanks for the impressively fast feedback on the bug report and on the images. Thanks also for letting me know that it is a current limitation and I wasn't just unaware of the right way to do it. It is an important capability in editing. When I paste in text from a source that is not a word processing document, this type of cleanup of line breaks is commonly needed. For example, I ran into it because I wanted to remove the paragraph marks in front of the YouTube transcript timestamps so they would appear at the end of the lines, making the transcript text much more readable. The inability to do this type of find (or find & replace) is a major limitation. Word and Notepad++ both allow find & replace of paragraph marks. Hopefully the capability can be added in a future release. It is weird to have to use a different editor to pre-process text destined for LibreOffice Writer, especially if it is a paid program like Word. (FWIW, Notepad++ - the Windows version - has an especially clean implementation - better than Notepadqq, the Linux version - because it explicitly shows precisely what special characters make up the paragraph mark. That makes it very easy to match the desired string in the Find target. The Notepadqq Linux version for some weird reason does not use this explicit display of the line termination characters. Explicit display is also super important because of the variations for Linux and Windows - CRLF, LF and sometimes just CR.)
But If I'm not wrong, you can do it with the extension: https://extensions.libreoffice.org/en/extensions/show/alternative-dialog-find-replace-for-writer