View Single Post
  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Tony Jollans Tony Jollans is offline
external usenet poster
 
Posts: 1,308
Default Wildcard Search and Replace

.. which will still suffer at the hands of the same bug.

--
Enjoy,
Tony

www.WordArticles.com

"macropod" wrote in message
...
Or, for hard spaces in the replacement:
\1^s\2^s\3

--
Cheers
macropod
[Microsoft MVP - Word]


"macropod" wrote in message
...
Hi Johann,

You could perhaps try:
([A-Z]{3})(/)([A-Z]{3}) as the Find, with
\1 \2 \3 as the Replace.
Note: the and prevent the Find from processing strings of 4 or more
letters.

--
Cheers
macropod
[Microsoft MVP - Word]


"Johann Swart" wrote in message
...
I have "inherited" a set of documents that exhibit a rather strange
behaviour.
In these documents three-letter codes are listed in the form ABC/DEF. I
want to change these to ABC / DEF (i.e. [code][hardspace][forward
slash][hardspace][code]). In the Word Search and Replace I select Use
Wildcards. I then enter in the Find What line: ([A-Z]{3})/([A-Z]{3}) and
in the Replace With line \1^s/^s\2.
The result is this (surprisingly!): ABCDEF /.
When I create a new test document to replicate this situation, the
result is as expected, i.e. ABC / DEF.
Has anyone ever experienced a situation similar to this? The problem
obviously lies with the document itself and not the PC or Word. Has
anyone any idea what is going on here and how one can remedy this
peculiarity?