I have recently switched from Microsoft Office to OpenOffice.org. In Word, I had set up a macro to join lines of a text file by a few find and replace commands involving paragraph marks. I would like to do the same in OpenOffice Writer, but can't seem to select a paragraph mark to paste into the Find & Replace dialog box. Nor can I find any other way to place a paragraph mark there.
I do a lot of text file editing, and really need a way to join lines which end in a paragraph mark so that the text flows to the right margin. Your help will be appreciated.
Annice
[Solved] How can I enter a paragraph mark in Find/Replace?
[Solved] How can I enter a paragraph mark in Find/Replace?
Last edited by annice on Wed Dec 19, 2007 10:02 am, edited 1 time in total.
- Hagar Delest
- Moderator
- Posts: 32728
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: How can I enter a paragraph mark in Find/Replace?
You should see the OOo help file about regular expressions. Open the Find & Replace dialog, click on the More Options button and then on the Help button. The paragraph mark is '\n' (without quotes). Don't forget to check the Regular expressions options.
Thanks to add '[Solved]' in your first post title (edit button) if your issue has been fixed.
Thanks to add '[Solved]' in your first post title (edit button) if your issue has been fixed.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
- Hagar Delest
- Moderator
- Posts: 32728
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: How can I enter a paragraph mark in Find/Replace?
I forgot to tell that \n is a line feed, not really a paragraph mark. The paragraph mark is '$'.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
Re: How can I enter a paragraph mark in Find/Replace?
Thanks! That works.
Annice![Very Happy :D](./images/smilies/icon_biggrin.gif)
Annice
![Very Happy :D](./images/smilies/icon_biggrin.gif)
- Hagar Delest
- Moderator
- Posts: 32728
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: How can I enter a paragraph mark in Find/Replace? [Solved]
To be even more complete on that topic, you can see that excellent wiki page : Regular Expressions in Writer.
But beware of the 64k limit for paragraph length. OOo paragraphs cannot be longer and replacing all the paragraph marks in a long document can lead to data loss, see that bug report : Issue 17171- Paragraph cannot be longer than 65534 characters.
But beware of the 64k limit for paragraph length. OOo paragraphs cannot be longer and replacing all the paragraph marks in a long document can lead to data loss, see that bug report : Issue 17171- Paragraph cannot be longer than 65534 characters.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
Re: How can I enter a paragraph mark in Find/Replace? [Solved]
And I'll that $ represents a paragraph break in the Search box but \n represents a paragraph break in the Replace box and there is no way to represent a line break in the Replace box.
Re: How can I enter a paragraph mark in Find/Replace? [Solved]
Unless your OS's Unicode input method works in the replace box, then you may be able to enter U+000A directly.JohnV wrote:... and there is no way to represent a line break in the Replace box.
Re: [Solved] How can I enter a paragraph mark in Find/Replace?
huw,
I'm testing with Windows 98 and U+000A or \x000A give me a literal replacement with those characters.
Does any OS support this?
I'm testing with Windows 98 and U+000A or \x000A give me a literal replacement with those characters.
Does any OS support this?
Re: [Solved] How can I enter a paragraph mark in Find/Replace?
You can't just type the values, you have to use your OS's Unicode character input method. On Windows you hold down the Alt key and tap out the value on the number pad, BUT that only normally works for values up to 0255 - see the link in my previous post, and also http://www.georgehernandez.com/h/xCompu ... rtcuts.aspJohnV wrote:I'm testing with Windows 98 and U+000A or \x000A give me a literal replacement with those characters.
At least one variety of Linux - again, see the link in my previous post for details.JohnV wrote:Does any OS support this?