Using find & replace with search string $ finds paragraph, but using $$ doesn't find an empty paragraph

I get text from tyros who separate paragraphs using 2 enters, rather than using styles. I’m supposed to format them for publication. Using find & replace with regular expressions active finds a single $, but not two $$.
Q: How can I find blank paragraphs?

MS Windows 10

With Regular expressions checked, search for ^$. Replace with -nothing-.

This works great, thank you!

LO Writer search/replace is well-nigh useless.

The well-recommended Alternative search-replace extension has not been updated since Jan 21, 2014 & is declared as suitable for lo-4.1. I’ve no idea how it performs under 5.0.

If you decide to code a macro, the following will help:

These are the Unicode chars used for new line/paragraph/page entry:

  • New Line: (U+000A) LINE FEED (LF)
  • New Paragraph: (U+000D) CARRIAGE RETURN (CR)
  • New Page: (U+000C) FORM FEED (FF)

Entering a LF char ((kbd:):Shift+Enter) will start a newline in the same paragraph (or bullet-point), whilst entering a CR char ((kbd:):Enter) will start a newline but also a new paragraph. Entering a FF char ((kbd:):Ctrl+Enter) will start a newline, new paragraph + new page all at the same time.

Thus, if you write yourself a search/replace macro you will be looking for 2 consecutive CR chars & replacing them with a single CR char.

Have fun!

If this helps then please tick the answer (:heavy_check_mark:)

…and/or show you like it with an uptick () is a very nice extension which easily allows searching for double paragraph marks (\p\p) or series of empty paragraphs (^$\p*). It also features a drop down list of regular extensions (and properties) for those of us who don’t remember which regular expression to use. I use it (often) with L.O., no personal experience with the new release.

Re Alternative search extension:
Tentatively (since I have not tried it pre v5.0) it may be OK under LO5.0
(In the last half-hour I thought the opposite!)

  1. I searched for \p (ie para marks) and it found them [but only with Regular Expressions on, which was what I had failed to do before]
  2. I also tried changing all ‘it’ to ‘it’, preserving capitalisation - just to see if anything changed - and it worked as expected.
  3. It may have slowed LO down considerably, after doing a substantial replace, but this may be due to other causes.