View Single Post
  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Julian
 
Posts: n/a
Default Replace/Erase substring of a word

Hi

Example 1
Word without format
Word befo stronger
Word after: er

Example2
A whole line with bold format
Line befo My name is Julian
Line after: me is Julian

Is the expression
*{4}(*)
going to mark the first 4 characters in every word in the text even when you
use the expression just for searching words?

"Greg Maxey" wrote:

Julian,

Hmm,,try Find: *{4}(*)
Replace: \1

If this doesn't work, show me an example of what should be found and what it
should look like afterwards.

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


Julian wrote:
Yes I did as you mentioned.
Even though if I did not change the Find field to bold it should have
deleted the first five characters of words with normal format?



"Greg Maxey" wrote:

Did you set the format in the find field to "Bold."

It should work if I understand your objective. Find words in bold
and delete first five characters.

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


Julian wrote:
Thanks Greg
I did as you mentioned but it did not work.

I tried to search
?{5}(*)

and replace it with
\1




"Greg Maxey" wrote:

Try

MoreUse Wildcards

Find: ?{5}(*)
Replace with \1

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


Julian wrote:
Hi
I am trying to find words with bold format and delete the
substring [0,5] of all occurences
All words are longer then 5 letters.
I am able to find the words with the format but I cannot delete
the substing. Is it possible to type something like [6]* in the
replace field to keep the letter 6 and higher in the word?
Any suggestions?