Help with Wildcard search/replace, please?

E

Ed

I'm trying to find
paragraph, tab, small letter a-z, period, tab
and replace it with
the original paragraph and tab, two more tabs, left parenthesis, the
original letter, right parenthesis, the original tab.

I constructed the following wildcard Find:
(^13^t)([a-z]).(^t)
and Replace With:
\1^t^t[\(]\2[\)]\3

I get the following error:
"The Replace With text contains a group number which is out of range."
I only have three groups in the Find, and \1, \2, and \3 in the Replace
With. Unless perhaps Word is seeing [\(] and [\)] as another group?

Any suggestions, please?
 
E

Ed

Ed said:
I'm trying to find
paragraph, tab, small letter a-z, period, tab
and replace it with
the original paragraph and tab, two more tabs, left parenthesis, the
original letter, right parenthesis, the original tab.

I constructed the following wildcard Find:
(^13^t)([a-z]).(^t)
and Replace With:
\1^t^t[\(]\2[\)]\3

I get the following error:
"The Replace With text contains a group number which is out of range."
I only have three groups in the Find, and \1, \2, and \3 in the Replace
With. Unless perhaps Word is seeing [\(] and [\)] as another group?

Never mind. I replaced the [\(] and [\)] with ^40 and ^41 and it worked
fine. Thank you Graham Mayor and Klaus Linke for your excellent tutorial on
the Word FAQs! I just needed to read and think a bit more.
 

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