Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
A.N.
 
Posts: n/a
Default Find ! in document and remove

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.


  #2   Report Post  
Posted to microsoft.public.word.docmanagement
marrie
 
Posts: n/a
Default Find ! in document and remove

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.



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
A.N.
 
Posts: n/a
Default Find ! in document and remove

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.





  #4   Report Post  
Posted to microsoft.public.word.docmanagement
marrie
 
Posts: n/a
Default Find ! in document and remove

Yikes! You wrote that code yourself? in the VB editor? I don't know how to
use that as of yet.
Seen it all, done it all, can't remember most of it

"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.







  #5   Report Post  
Posted to microsoft.public.word.docmanagement
A.N.
 
Posts: n/a
Default Find ! in document and remove

Solved. A basic part of code writing overlooked, pardon me, here it is for
others:

Example: ([a-z][!][spacebar][a-z])

Interpretation: will find the end of a presumed sentence or word with an !
then a space before a new sentence, however the next sentence was in
lowercase as well.

Sample: "end of a sentence! start of another"

I needed to remove the ! mark. The above code did work to find it as
prescribed, but I could not figure out how to remove the !.

Now for the miserably simple overlook. In all the examples it was not clear
what "\1" or "\2" meant. Place holder I guess, IF they are designated with
( ) brackets.

Corrected Example: ([a-z])([!])([spacebar-literally])([a-z]) Now each item
is enclosed in brackets.

There are four sets of brackets, therefore four place holders so-to-speak.

Replace code therefore is a simple - I want to keep brakets or space holders
\1\3\4 and wala, it worked. I imagine there is some redundancy in that
search code though. An expert could provide the most correct rendering.

-End


"marrie" wrote in message
...
Yikes! You wrote that code yourself? in the VB editor? I don't know how to
use that as of yet.
Seen it all, done it all, can't remember most of it

"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.











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

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.







  #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.









Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I remove a page from a word 2000 document e.g. last blank p docpete Microsoft Word Help 8 May 19th 08 09:48 PM
How do I remove lines from a document in print view Twinkle Microsoft Word Help 3 May 23rd 05 05:33 AM
Remove users from the Exceptions list when using document protecti KimboR Microsoft Word Help 3 April 26th 05 10:22 AM
Find and Replace anomaly BruceM Microsoft Word Help 7 January 18th 05 06:47 PM
How do I remove multiple frames from a document? Speedyy57 Page Layout 1 December 16th 04 10:21 AM


All times are GMT +1. The time now is 02:02 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"