View Single Post
  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel
 
Posts: n/a
Default replacing clarification

Not quite. That won't handle I as the first or last character of the
document, nor consecutive Is.




"Graham Mayor" wrote in message
...
You should be able to do it in one pass. The following will work for your
stated requirement.
Replace (wildcard flag set)
([!#])I([!a-z])
with
\1#I\2

All the 'codes' are listed in the article to which I referred you
earlier - http://www.gmayor.com/replace_using_wildcards.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




jezzica85 wrote:
Thanks Jezebel, that worked great! Just so I know, though, what
exactly does the "\1" mean, and are there any other replace codes
like it?
Thanks again!
Jezzica85

"Jezebel" wrote:

Probably simplest to do this in several steps. Word's wildcarding
has no 'zero-or-more' option, so 'replace unless' is tricky. It's
easier to replace all then, remove the ones you don't want ---

1. Replace all I with #I (no wildcards).

2. Replace all #I with I (no wildcards).

3. Replace all #(I[a-z]) with \1 (wildcards)



"jezzica85" wrote in message
...
Hi all, I know I've asked this question before, and thanks to the
person who
responded about using wildcards, but I can't quite figure out how
to do it with the wildcards, even though I've tried (sheepish
smile). So, is there anyone who can give me a step-by-step how-to
on changing

I I've I'd I'm Ida Is it

to

#I #I've #I'd #I'm Ida Is it

Basically, replacing I with #I only if it isn't followed by a
lowercase letter or preceded by the "" symbol?

Thanks so much!
Jezzica85