We will be migrating from Ask to Discourse on the first week of August, read the details here

 Ask Your Question

# Is there an easy way to find a paragraph mark and replace it with a line ending or a space. [closed]

In MS Word you can find a paragraph mark by entering ^p. It is a very useful function if you copy text that put an unwanted paragraph mark at the end of every line if it it is in the middle of a sentence.

edit retag reopen merge delete

## 3 Answers

Sort by » oldest newest most voted

Tick "Regular expressions" in "Search and replace" dialog. Search for $, replace with space. https://wiki.openoffice.org/wiki/Docu... more ## Comments Wow, such a simple straightforward solution. I've been searching help forums for hours looking for help on this very issue. Thank you so much! ( 2015-09-09 20:49:05 +0200 )edit Hi, I am really struggling with this issue of finding and replacing paragraph mark. The regular expression let me find and replace the paragraph mark itself, but if I am looking for a combinaison of specific characters and paragraph mark, it escape the paragraph mark. I.e. if I want to replace "-$" by nothing (to remove the hyphen), it will only remove the "- " and keep the paragraph mark. Eventually, I did it with MS Word. Now I am trying to replace the paragraph mark without dot (i.e. [any character beside "." + \p] by space and keep the paragraph mark with dot alike...

Suggestions?

Best regards, Pierre

more

## Comments

1

You need to use the AltSearch extension for this type of search / replace.

( 2014-04-20 13:03:50 +0200 )edit

Hello. I couldn't do this (replace a praragraph mark only when it follows a specific character - a dot-), neither with Altsearch.

( 2020-06-26 06:15:46 +0200 )edit

Hi,

I had a similar problem: How can I replace "a paragraph mark followed by a space" with "just a paragraph mark"?

Im MS Word, this would be: replace "^p " with "^p" (leaving out the quotation marks).

In LibreOffice, I found I can do the same by saying replace "^[ ]" with nothing (leaving out the quotation marks, and enabling regular expressions). Here, ^ means start of new line, and [ ] is a single space character contained between two square brackets.

--> I am not sure why the [ ] brackets are needed to make the search-replace work properly with the space character here, where in the following cases just a normal space will work:

If you want to replace every paragraph mark with a space, you can search for "$", which is any paragraph mark, and replace it with " " (leaving out the quotation marks, and enabling regular expressions). If you just want to replace double paragraph marks with a space, then search for "$^" and replace with " " (leaving out the quotation marks, and enabling regular expressions).

more

## Comments

Have tried all of the above methods multiple times and none of them ever "finds" the paragraph. Must be missing something.

( 2015-01-04 12:43:56 +0200 )edit

OMG: Perfect answer!!!!! Looked all over the web until I found this. Thanks so much. I had "double paragraph marks" all over my 500 page doc. This sentence, from above, solved my problems: "If you just want to replace double paragraph marks with a space, then search for "\$^" and replace with " " (leaving out the quotation marks, and enabling regular expressions)."

( 2016-03-31 17:40:13 +0200 )edit

@larrybradley, you must check "Regular expressions" in search and replace dialog.

( 2016-08-13 22:37:05 +0200 )edit

## Stats

Asked: 2014-04-18 02:43:21 +0200

Seen: 38,071 times

Last updated: Sep 19 '14