Ask Your Question
0

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

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

crispinhull gravatar image

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 flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-03-03 22:33:56.082892

3 Answers

Sort by » oldest newest most voted
2

answered 2014-04-18 10:08:23 +0200

mahfiaz gravatar image

Tick "Regular expressions" in "Search and replace" dialog. Search for $, replace with space.

https://wiki.openoffice.org/wiki/Docu...

edit flag offensive delete link 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!

jjashford gravatar imagejjashford ( 2015-09-09 20:49:05 +0200 )edit
1

answered 2014-04-20 07:40:59 +0200

Pierre gravatar image

updated 2014-04-20 08:21:47 +0200

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

edit flag offensive delete link more

Comments

1

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

oweng gravatar imageoweng ( 2014-04-20 13:03:50 +0200 )edit
0

answered 2014-09-19 09:20:47 +0200

gustep gravatar image

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).

edit flag offensive delete link more

Comments

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

larrybradley gravatar imagelarrybradley ( 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)."

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

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

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

Question Tools

1 follower

Stats

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

Seen: 28,388 times

Last updated: Sep 19 '14