Wild Card Searching--Again

J

Joe McGuire

I am slowly getting the hand of searching using wildcards, but the Replace
With is vexing me a bit. I want to take all examples of sub-paragraphs (in
a specific style) like:

a.->xxxxxxxxx
b.->yyyyyyyyy (where -> represents the tab character)

and replace it with

(a)->xxxxxxxx
(b)->yyyyyyyy

I can find the things using "[abcdefg]{1}.^t" (without the quotes but with
the style) but I can't figure out from Graham Mayor's excellent how to
replace the letter in question with the same letter.
 
S

Suzanne S. Barnhill

If the numbering had been applied to the style (via Format | Bullets and
Numbering), then you could just change the number format of the style.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
K

Klaus Linke

And if it's hard text, you can put parentheses around the expression you
want to use again.
In the replacement text, you then use \1 for the first such expression, \2
for the second, ...

In your example...
Find what: ([a-g]).(^t)
Replace with: (\1)\2

To make sure you only match single characters at the start of the paragraph,
you might include the preceeding paragraph mark:
Find what: (^13)([a-g]).(^t)
Replace with: \1(\2)\3

There's also a very old built-in command that allows you to select the
paragraphs, and then change the kind of numbering in a dialog,
ToolsBulletsNumbers, but it does not allow the kind of numbering you want.

Regards,
Klaus
 
J

Joe McGuire

Thanks. Yes, that would have made things quite simple. But then I'd
probably have to figure out how to get rid of the actual numbering in the
text. Unfortunately, the document in question started life as a legal
paper, then somebody scanned it and e-mailed it to us, and we tried the
usual computer voodoo to end up with a not-too-butchered looking Word
document, which we then cleaned up. Letting Word do the numbering for legal
documents is usually a mistake, particularly where the numbering of your
document has to correspond to the numbering of an earlier one, usually one
to which you are responding. Maybe next time we will try some numbering
with the styles for sub-paragraphs. Meanwhile, how to change "a." to "(a)",
"b." to "(b)" and so on down the alphabet, without doing it one letter at a
time.

Suzanne S. Barnhill said:
If the numbering had been applied to the style (via Format | Bullets and
Numbering), then you could just change the number format of the style.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup
so
all may benefit.

Joe McGuire said:
I am slowly getting the hand of searching using wildcards, but the
Replace
With is vexing me a bit. I want to take all examples of sub-paragraphs (in
a specific style) like:

a.->xxxxxxxxx
b.->yyyyyyyyy (where -> represents the tab character)

and replace it with

(a)->xxxxxxxx
(b)->yyyyyyyy

I can find the things using "[abcdefg]{1}.^t" (without the quotes but
with
the style) but I can't figure out from Graham Mayor's excellent how to
replace the letter in question with the same letter.
 
J

Joe McGuire

Klaus, this worked perfectly. Searching with wildcards is great, even it
not exactly intuitive. Thanks!

Klaus Linke said:
And if it's hard text, you can put parentheses around the expression you
want to use again.
In the replacement text, you then use \1 for the first such expression, \2
for the second, ...

In your example...
Find what: ([a-g]).(^t)
Replace with: (\1)\2

To make sure you only match single characters at the start of the
paragraph, you might include the preceeding paragraph mark:
Find what: (^13)([a-g]).(^t)
Replace with: \1(\2)\3

There's also a very old built-in command that allows you to select the
paragraphs, and then change the kind of numbering in a dialog,
ToolsBulletsNumbers, but it does not allow the kind of numbering you want.

Regards,
Klaus



Joe McGuire said:
I am slowly getting the hand of searching using wildcards, but the Replace
With is vexing me a bit. I want to take all examples of sub-paragraphs
(in a specific style) like:

a.->xxxxxxxxx
b.->yyyyyyyyy (where -> represents the tab character)

and replace it with

(a)->xxxxxxxx
(b)->yyyyyyyy

I can find the things using "[abcdefg]{1}.^t" (without the quotes but
with the style) but I can't figure out from Graham Mayor's excellent how
to replace the letter in question with the same letter.
 
J

Joe McGuire

Thanks! This did the trick!

Klaus Linke said:
And if it's hard text, you can put parentheses around the expression you
want to use again.
In the replacement text, you then use \1 for the first such expression, \2
for the second, ...

In your example...
Find what: ([a-g]).(^t)
Replace with: (\1)\2

To make sure you only match single characters at the start of the
paragraph, you might include the preceeding paragraph mark:
Find what: (^13)([a-g]).(^t)
Replace with: \1(\2)\3

There's also a very old built-in command that allows you to select the
paragraphs, and then change the kind of numbering in a dialog,
ToolsBulletsNumbers, but it does not allow the kind of numbering you want.

Regards,
Klaus



Joe McGuire said:
I am slowly getting the hand of searching using wildcards, but the Replace
With is vexing me a bit. I want to take all examples of sub-paragraphs
(in a specific style) like:

a.->xxxxxxxxx
b.->yyyyyyyyy (where -> represents the tab character)

and replace it with

(a)->xxxxxxxx
(b)->yyyyyyyy

I can find the things using "[abcdefg]{1}.^t" (without the quotes but
with the style) but I can't figure out from Graham Mayor's excellent how
to replace the letter in question with the same letter.
 
K

Klaus Linke

Great! What's missing in Word wildcard searches are anchors for the start
and end of paragraphs.
I'm suggesting those every time I get a chance.

Regards,
Klaus


Joe McGuire said:
Thanks! This did the trick!

Klaus Linke said:
And if it's hard text, you can put parentheses around the expression you
want to use again.
In the replacement text, you then use \1 for the first such expression,
\2 for the second, ...

In your example...
Find what: ([a-g]).(^t)
Replace with: (\1)\2

To make sure you only match single characters at the start of the
paragraph, you might include the preceeding paragraph mark:
Find what: (^13)([a-g]).(^t)
Replace with: \1(\2)\3

There's also a very old built-in command that allows you to select the
paragraphs, and then change the kind of numbering in a dialog,
ToolsBulletsNumbers, but it does not allow the kind of numbering you
want.

Regards,
Klaus



Joe McGuire said:
I am slowly getting the hand of searching using wildcards, but the
Replace With is vexing me a bit. I want to take all examples of
sub-paragraphs (in a specific style) like:

a.->xxxxxxxxx
b.->yyyyyyyyy (where -> represents the tab character)

and replace it with

(a)->xxxxxxxx
(b)->yyyyyyyy

I can find the things using "[abcdefg]{1}.^t" (without the quotes but
with the style) but I can't figure out from Graham Mayor's excellent how
to replace the letter in question with the same letter.
 

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