replace three spaces between sentences with two spaces

E

Elliott Roper

Russs said:
Then the "Special" button in the lower right of the dialog becomes context
sensitive to using wildcards and will list as one its choices-
"Num Occurrences"
Select that choice and {,} should insert at the cursor in your Find textbox
for use. Unfortunately the first or only number doesn't work if it is a
number zero, so don't use that within the curly braces. Also make sure that
something is preceding the braces in the Find textbox to act upon and that
there is something in the document to find with that criteria.
Heh! They were my early thoughts on tracking down why it went into a
sulk too. I forgot to mention I tried all that first. That it was
working and then stopped working after a crash related to playing silly
games with the search expressions steers me toward thinking I have
corrupted a setting somewhere. I shall cast all the magic spells in
order and sacrifice a chicken.
 
M

mack

Simple problem: I can easily find a full-stop with a double qute mark
i.e.

by typing ." in the find box.

What I'm trying to do: find a full-stop and a quote mark followed by a
single space then a capital letter.
i.e. the start of a new sentence, so I can replace with double
spaces.

What I tried: ([."]) ([A-Z]) + 'use wildcards' and also ([."])
([A-Z]) + 'use wildcards'

I must be getting something basically wrong, but am going around in
circles trying to fix it. Thank you for your help.
 
M

mack

Also trying to find exclamation and question marks followed by sentence
Beginnings separated by only one space, so I can replace them with two
spaces.

In the Find box I have typed:

\! ([A-Z])

This works for exclamation marks, (I remember that question marks will
need to be bracketed.

What should I put in the Replace box?

I tried: \! \1 and also \! ([A-Z])

The error message is 'group number out of range'. In fact, word won't
even find if these are in the replace box.
 
R

Russs

Also trying to find exclamation and question marks followed by sentence
Beginnings separated by only one space, so I can replace them with two
spaces.

In the Find box I have typed:

\! ([A-Z])

This works for exclamation marks, (I remember that question marks will
need to be bracketed.

What should I put in the Replace box?

I tried: \! \1 and also \! ([A-Z])

The error message is 'group number out of range'. In fact, word won't
even find if these are in the replace box.
The replace box expects any backslash to be adjoin with a number to denote
which parentheses grouping in the find back you are referring back to:
\1=what's in first pair,\2=what's in second pair,etc.

See the link below for more information.

If you are using Safari as a browser, you may need to click on the page
refresh button in the toolbar a few times in order to see the tutorial.

http://word.mvps.org/faqs/general/UsingWildcards.htm
 
M

mack

Thank you, that helped. What I need to do next is find a quote mark at
the end of a sentence followed by a space and then a capital letter.

I tried: " ([A-Z]) and also (["]) ([A-Z]) wildcards on

Is there an obvious reason why this doesn't work? Have read the
tutorial--no wonder I couldn't find it in help. Thank you.
 
M

mack

Also tried: ([\"]) ([A-Z])

If I just type an exclamation mark with a space at the end of it: "
I can find all the end-of-sentence quote marks. If I put it in
brackets with wildcards enabled it doesn't find many at all, but I have
to have wildcards enabled to search for capital letters that indicate
the start of sentences, don't I?
 
R

Russs

On 8/29/05 6:01 PM, in article
(e-mail address removed), "mack"
<[email protected]> wrote:
Also tried: ([\"]) ([A-Z])

I thought we went through all the punctuation choices earlier in this
message thread. Check those earlier replies. You don't always have to
enclose everything within square brackets or parentheses, they serve a
specific purpose during a wildcard search, otherwise you can enter what you
want to find literally. Or mix literal with wildcards when wildcards
checkbox is checked. Go into "Word Help" and search for terms like 'find',
'replace', or 'wildcards'.
 
M

mack

thought we went through all the punctuation choices earlier in this
message thread.
yes, thank you. I have, and yes I have tried 'mixing and matching'
literal and wildcards when the wildcards box is checked--even I'm not
that slack. i will go through the whole thing again--i just thought you
might be able to spot what I was doing straight away, as in "oh.. the
idiot's forgotten to put in a backslash" or something. It's such a
simple request--quote mark space capital letter--I can't see what I'm
doing/not doing--sorry to bother you--appreciate all the help. I will
go through it and get back. Thanks.

Check those earlier replies. You don't always have to
enclose everything within square brackets or parentheses, they serve a
specific purpose during a wildcard search, otherwise you can enter what
you
want to find literally. Or mix literal with wildcards when wildcards
checkbox is checked. Go into "Word Help" and search for terms like
'find',
'replace', or 'wildcards'.
 
K

Klaus Linke

Hi Russ,

If it's a problem of curly quotes vs. straight quotes:
You can paste the quote you want to find from the text into the dialog
(Command+C, Command+V).

Find what: ([.\!\?"]) ([A-Z])
Replace with: \1 \2
if you want to find a dot, exclamation mark, question mark, or curly double
closing quote followed by three spaces and a capital letter (... since this
is a plain text post in ISO-Latin1, you will see a straight quote in this
message instead of the closing curly quote).

You can also use the Mac-Roman code of the closing quote:
Find what: ([.\!\?^211]) ([A-Z])

Unfortunately, Unicode codes (^u8221) don't work (yet) with wildcard
searches, so you can't use a code for the curly quotes that works both on
the Mac and a PC (and UNIX/Linux...).

Greetings,
Klaus
 
M

mack

THANK YOU KURT! YOU JUST SAVED ME A WHOLE DAY'S WORK! Unfortunately I
will have to check the whole document again, as there still was a
single-spaced sentence, and there may be others--but you got 377 of
them!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top