Avatar of zhshqzyc
zhshqzyc
 asked on

Replace Carriage return with empty

I have a lot Carriage return in a file, how to replace them with empty quickly?
Now I delete them manually.
Microsoft Word

Avatar of undefined
Last Comment
zhshqzyc

8/22/2022 - Mon
SOLUTION
yobri

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
GrahamSkan

Have you tried Find and Replace?

Find: ^p
Replace:     (space or nothing)
yobri

Replace above is essentially blank.
GrahamSkan

Ctrl+H opens the 'Find and Replace' dialogue.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
GrahamSkan

When a text file is opened in Word carriage returns are treated as paragraph markers. Hence ^p. ^ means a special character is next and p means that it is the end of a paragraph.

Note that line feeds are represented by ^l (carat + lowercase L), which might look the same in your document.
zhshqzyc

ASKER
My case is a little complex. Please see the attached samples.
VBA needed?

Points are increased to 500.
WWOX.doc
wwox
ASKER CERTIFIED SOLUTION
GrahamSkan

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
GrahamSkan

Oops.  For  "acryall nee", read "actually need". Thank you.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
zhshqzyc

ASKER
I will come back to explain a little bit.
SOLUTION
Paul Sauvé

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
zhshqzyc

ASKER
Maybe manually do it is fast.
Firstly: I want to remove
WWOX

Open in new window

because it is underlined.
Secondly I want to remove : or in other words replace : with a tab
Thirdly: the format likes
[title][tab][agcttgca...][c/r]
[title][tab][agcttgca...][c/r]
[title][tab][agcttgca...][c/r]

Open in new window

title likes
76706436/P98L

Open in new window


Another test file is attached.
test.doc
GrahamSkan

This is changing from a simple question to a project.

Also it's not easy to understand what you are trying to do.

You have some underlined paragraphs with text beginning 'TITLE'. After that you have some other paragraphs, alternating between short paragraphs, ending with a colon, and longer paragraphs which don't. There is also an empty paragraph after this set.

Assuming that you have taken our previous advice on board, can you now please explain where you are having problems?
Your help has saved me hundreds of hours of internet surfing.
fblack61
zhshqzyc

ASKER
The previous advice is helpful. But it removed all carriage return. What I want is to keep one carriage return between short paragraphs.

I used replace all to cause the issue. Probably I have to replace one by one.
Paul Sauvé

Original question (ID: 27037232, Author: zhshqzyc): I have a lot Carriage return in a file, how to replace them with empty quickly?
Now I delete them manually.


I agree - esentially, the question (ID: 35757264, Author: zhshqzyc) has nothing to do with replacing carriage returns.
Paul Sauvé

If you look at the test.doc file, you are trying to insert new paragraphs at what seems random places in your document. This can only be done manually.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
zhshqzyc

ASKER
Okay. Never mind. Thanks for help. Point splited.