Ask Your Question

Search and Replace Tools

asked 2019-10-28 03:14:20 +0100

DraftWorks gravatar image

updated 2021-01-02 14:35:58 +0100

ajlittoz gravatar image

I have previously used the Alternative Find & Replace extension, but I'm receiving an error that a number of other users have received (screenshot attached). Their questions/tickets indicate that no resolution has been found and the developer has not responded to email or questions. I've reinstalled the extension multiple times. (I'm running Version: (x64) on OS Windows 10, and the AltSearch extension is 1.4.2.)

What are the other options available for searching for formatting codes in a Writer file? For example, I need to locate any occurrence of "space paragraph return paragraph return" and replace that with a single paragraph return. This would be fairly straightforward in MS Word ( ^p^p --> ^p). I've tried searching by $, but it doesn't seem that symbol can be used in conjunction with other symbols, like to only find a paragraph return when preceded by a space.

Is there another recommended extension or different codes that can be used as regular expressions in Search/Replace? Thank you.

C:\fakepath\Search OXT Error.png

(edited on 2021-01-02 by ajlittoz to display the screenshot)

edit retag flag offensive close merge delete


Hopefully you wouldn't use a chainsaw without having read the important parts of the manual.

Concerning AltSearch and its usage of Regular Expressions:
\p searches for a paragraph break.
\p+ searches for a sequence of paragraph breaks.
Replacing \p+ with \p does it (in a clever way without needing to look for pairs of paragraph breaks again and again.

Lupp gravatar imageLupp ( 2019-11-04 21:52:57 +0100 )edit

I'm afraid that AltSearch wasn't working at all (see the error message screenshot attached) and isn't an option for search and replace, but I would be very interested to know if anyone has a solution for that Basic Runtime Error (it has been reinstalled multiple times but still won't run). Perhaps the answer is in my missing chainsaw manual. :-)

DraftWorks gravatar imageDraftWorks ( 2019-11-07 19:42:17 +0100 )edit

2 Answers

Sort by » oldest newest most voted

answered 2019-11-04 20:53:26 +0100

Grantler gravatar image

updated 2019-11-06 18:33:14 +0100


Hi, there is the offline help system, search for regular expressions -- list of for the regular SEARCH&REPLACE tool.

You could find ^$Finds an empty paragraph. Search and replace with nothing. Then search for {1}$ which finds exactly one tailing space at the paragraph's end. (You may probably look for a better choice like \s{1}$, if necessary.) So you could replace space | paragraph return | paragraph return with paragraph return ´- in two steps.

But this method may not be specific for your purposes, probably you only wanted to find the desired combination of "values". Knowing this I hesitated giving an answer to your question...

  • For more information check... (also descripted rare "unexpected results") and (sorry, was not available at that moment) and

other addresses given in the above mentioned wiki website.


And the truth about AltSearch.oxt is that it does not always exactly work under all circumstances. But AltSearch.oxt could do - in a restricted proceeding (single step method).

Search for \s{1}\p^$ and replace with... \p - but only single replacing! (Replace all does not sufficiently work in this case.) So you have a lot of single steps, maybe it's too cumbersome for you. But it could work...

If Word does better, so use it. Hopefully LibreOffice will reach that standard in future ;-). - Cheers

edit flag offensive delete link more



Thank you -- I greatly appreciate the information. It's good to see an approach to search&replace that could get at at least part of what I'm trying to correct. Your suspicion was correct that, because of other formatting in the document, I would need to find and replace only that precise combination of values all in one fell swoop, but those codes and steps will be very helpful with other situations. I've enjoyed working in LO as a basic word processing package, but it's certainly capable of a lot more, even if I need to briefly step outside it. Thank you!

DraftWorks gravatar imageDraftWorks ( 2019-11-11 15:31:26 +0100 )edit

answered 2019-11-04 18:07:27 +0100

DraftWorks gravatar image

No answers and I was under a deadline, so I took the file to a computer that had MS Word and resolved the issue in less than five minutes. This issue is something that comes up a lot for me, so I think I need to set up regular access to MS Word instead of relying only on LO.

edit flag offensive delete link more


Do not answer your own question unless it is a real answer.

gabix gravatar imagegabix ( 2019-11-04 19:01:59 +0100 )edit

So I'm clear going forward, must a solution to a problem only involve resources found within LO?

DraftWorks gravatar imageDraftWorks ( 2019-11-07 19:40:03 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-10-28 03:14:20 +0100

Seen: 445 times

Last updated: Jan 02