Removing extra spaces [Problem Resolved}

Status
Not open for further replies.

E.L. Lynch

Registered
Joined
Dec 27, 2012
Messages
14
Reaction score
1
Does anyone know the "find and replace" code for removing extra spaces at the end of a paragraph?
 
Last edited by a moderator:

alleycat

Still around
Kind Benefactor
Super Member
Registered
Joined
Apr 18, 2005
Messages
72,891
Reaction score
12,242
Location
Tennessee
I assume you are using Word. Which version?
 

alleycat

Still around
Kind Benefactor
Super Member
Registered
Joined
Apr 18, 2005
Messages
72,891
Reaction score
12,242
Location
Tennessee
Well, since you've left . . .

Here a guide to what most, if not all, of the wildcats do: http://www.gmayor.com/replace_using_wildcards.htm

I was going to try to simplify it for you. In any event, I think you want to use:

Go to Find and Replace, select the More option, click the Allow Wildcats option.

In the Find box: put in a space, then put in:{1,}^13
In the Replace box:^p

You might want to test this on a copy of your file first.
 

alleycat

Still around
Kind Benefactor
Super Member
Registered
Joined
Apr 18, 2005
Messages
72,891
Reaction score
12,242
Location
Tennessee
Couldn't you just search for a space and a paragraph mark (^p) and replace with only a paragraph mark?

I think that would only get those occurrences where there is only one space at the end of the paragraph, but I'm not sure offhand. It's been a while since I've needed to do something like this (I use styles). It might be worth a try to the OP.
 

E.L. Lynch

Registered
Joined
Dec 27, 2012
Messages
14
Reaction score
1
Neither of those ways are working. I tried Alleycat's, and it said it made 42 replacements but the two spaces are still there after each paragraph.

It seems like when I had to format a manuscript for an e-publisher, they had us use Rainsmom's method, but that isn't working either.

Thanks to both of you all the same. I guess I'll keep piddlin' with it and see if I can get it to work.
 

veinglory

volitare nequeo
Self-Ban
Registered
Joined
Feb 12, 2005
Messages
28,750
Reaction score
2,934
Location
right here
Website
www.veinglory.com
Okay so you actually need the code for hard returns, replacing any instance of two in a row (¶¶) with just one (¶).
 

alleycat

Still around
Kind Benefactor
Super Member
Registered
Joined
Apr 18, 2005
Messages
72,891
Reaction score
12,242
Location
Tennessee
Ah, you mean extra line spaces after a paragraph. I misunderstood.
 

ResearchGuy

Resident Curmudgeon
Requiescat In Pace
Registered
Joined
Mar 26, 2005
Messages
5,011
Reaction score
697
Location
Sacramento area, CA
Website
www.umbachconsulting.com
Okay so you actually need the code for hard returns, replacing any instance of two in a row (¶¶) with just one (¶).
Spaces and/or tabs after paragraph returns make that more complicated. Not to mention what might lurk in paragraph styles. I always have to turn on display of all formatting marks in order to figure out what is in the file and how to fix it.

(Line breaks, ^l, also complicate many amateurs' files I've had to fix.)

--Ken
 

E.L. Lynch

Registered
Joined
Dec 27, 2012
Messages
14
Reaction score
1
Okay so you actually need the code for hard returns, replacing any instance of two in a row (¶¶) with just one (¶).

Yeah, that's what I'm trying to do so that the cursor is flush with the period after all paragraph breaks.
 

E.L. Lynch

Registered
Joined
Dec 27, 2012
Messages
14
Reaction score
1
Spaces and/or tabs after paragraph returns make that more complicated. Not to mention what might lurk in paragraph styles. I always have to turn on display of all formatting marks in order to figure out what is in the file and how to fix it.

(Line breaks, ^l, also complicate many amateurs' files I've had to fix.)

--Ken

Actually, it's not hard at all; I just can't remember the code. Musa used to have a tutorial for their authors on YT that walked us through all this.

It was as simple as putting the code in the "find" field and a different code in "replace."

But as I said, I can't recall the code and can't seem to find it anywhere online.
 

E.L. Lynch

Registered
Joined
Dec 27, 2012
Messages
14
Reaction score
1
The code, at least for me, is the widget I showed in parath.

When I pulled down the special characters from the F&R option, I found the widget you listed, but when I selected this option it loaded "^p." I put two of those codes in F and one in R. It came back saying 2 changes were made, but as I have a lot more paragraphs with two spaces at the end of a paragraph, I'm not sure what changes are being made. All those extra spaces are still there.
 

E.L. Lynch

Registered
Joined
Dec 27, 2012
Messages
14
Reaction score
1
Okay, I finally figured it out. In the F box, I needed to put two spaces before the ^p, and in the R box no spaces before the ^p. I then had to run it again with only one space before the ^p in the F box.

Thanks everyone who took the time to offer suggestions.
 

ResearchGuy

Resident Curmudgeon
Requiescat In Pace
Registered
Joined
Mar 26, 2005
Messages
5,011
Reaction score
697
Location
Sacramento area, CA
Website
www.umbachconsulting.com
. . .It was as simple as putting the code in the "find" field and a different code in "replace." . . . .
Only if there is just one consistent issue. Where there are multiple issues (and I encounter that in files I get for formatting or editing) it is more complicated.

Good that it was simple for you.

--Ken
 

Torgo

Formerly Phantom of Krankor.
Kind Benefactor
Super Member
Registered
Joined
Apr 7, 2005
Messages
7,632
Reaction score
1,204
Location
London, UK
Website
torgoblog.blogspot.com
I would just search for " " and replace with " " - then run that a few times until it stops finding stuff. That'll reduce any multiple spaces down to single spaces (you shouldn't ever need more than a single space.)

I then tend to do a few "^p^p^p" finds and replace all with "^p^p" - to reduce any extra lines between paragraphs to single lines.
 

alleycat

Still around
Kind Benefactor
Super Member
Registered
Joined
Apr 18, 2005
Messages
72,891
Reaction score
12,242
Location
Tennessee
Okay, I finally figured it out. In the F box, I needed to put two spaces before the ^p, and in the R box no spaces before the ^p. I then had to run it again with only one space before the ^p in the F box.

Were you putting in a space in the Replace box when you tried the earlier suggestions?
 

Ken

Banned
Kind Benefactor
Joined
Dec 28, 2007
Messages
11,478
Reaction score
6,198
Location
AW. A very nice place!
You might want to test this on a copy of your file first.

... or use the "reading highlight" in the find/replace dialogue box to view what is found first. Highlights in yellow. (Just do the find first and if that's satisfactory move on to include replace.) (Word 2010)
 
Status
Not open for further replies.