View Single Post
  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Tony Jollans
 
Posts: n/a
Default Find ! in document and remove

Oops - missed the space, sorry.

I see that you have solved it yourself and posted how - thank you.

It can however be simpler by only wrapping parentheses around the elements
you want to refer to, so:

([a-z])[\!]( [a-z])

\1 is the first parenthesised expression - the lowercase letter before the !
\2 is the second parenthesised expression - the space and lowercase letter
after the !

You will not be able to refer to the ! in the replacement - but you don't
want to

--
Enjoy,
Tony


"Tony Jollans" My Forename at My Surname dot com wrote in message
...
Find: ([a-z])[\!]([a-z])
Replace: \1\2

--
Enjoy,
Tony


"A.N." wrote in message
...
I have the find code correctly as this: ([a-z][!][spacebar][a-z])

How to write the replace code without the !

Thanks.


"marrie" wrote in message
...
I would find the exclaim mark and then look at each one to see if

that's
what you want to remove. It is a bit tedious but that's what I can come

up
with for now.

--
This is a message from God: "Rebooting the universe, please log out"

"A.N." wrote in message
...
How do I find all ! in a document where there is a lowercase letter

on
its left and a space and lower case letter on its right and then

remove
it?

Example: end! another sentence

Thanks again.