View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Ed Ed is offline
external usenet poster
 
Posts: 122
Default Help with Wildcard search/replace, please?


"Ed" wrote in message
...
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.

--
Ed
Chief Chef,
Kludge Code Cafe
"Spaghetti Is Our Specialty!"