Date: prev next · Thread: first prev next last
2022 Archives by date, by thread · List index


Den ons 16 mars 2022 kl 17:56 skrev Dave Barton <dbarton@posteo.net>:

I am looking for a find & replace solution in Writer, where there is a
blank space as the last character of a paragraph
(eg. last word <space><LF><CR>).


I think ␊␍ is Windows only, but maybe that doesn't matter in this case.


In the original OOo and most of the text editors I use the simple
solution that worked/works perfectly is:
Find = <space>$ Replace = $
(Note: I use <space> here to represent a single space character).

This does not work in LO Writer, so I am forced to fiddle around copying
from LO and pasting into AOO, running F&R in AOO, then copy/paste back
again.


It works perfectly for me. It replaces the space with a $ character, just
like expected (make sure ”☒ Regular expressions” is checked). If you don't
want the $ character, then just leave the Replace field empty.
I tried it a few seconds ago with LibreOffice 7.1.8.1 and it worked
perfectly. I suspect it works just as well with newer versions as well as
most older versions too.

In LibreOffice, the $ character doesn't mean a ”new line character”, it
doesn't work quite like that. A paragraph is kind of an object which
contains the actual text and all the properties of that paragraph (as far
as I understand it), so <space>$ doesn't really mean ”a space followed by a
newline character”, it rather means ”a space at the end of a paragraph”. It
just specifies where to look for the space, nothing more. So you are not
replacing two characters with one, you are replacing one character with
nothing and you are doing it at the end of a paragraph.

At least that's the easiest way I can explain it.

I hope this helps.

Are you sure that replacing with $ actually worked in Apache OpenOffice?
I'm not sure, but it shouldn't, should it? Because Apache OpenOffice works
the same way as LibreOffice in this matter, working with objects and all
that. As I no longer have Apache OpenOffice installed I can't test it, so I
can't say for sure.


Kind regards

Johnny Rosenberg



Any pointers would be welcome.

Dave

--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems?
https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.