Re: Find and Replace

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Thanks for your assistance in this, I am trying to do several things with
wildcards but will just have to sit down and get to grips with them through
practise and perseverance.

My biggest current problem is how to find all words in a document that have
been abbreviated with an apostrophe (there's, it's, etc) and replace these
with the complete words (there is, it is, etc).

I've been trying with <*'s> but that is obviously not correct...
--
Thanks again,
MarkN


"Greg Maxey" wrote:

Mark they may appear the same is some cases. Take:

"Now is the time for all good men to come to the aid of their county.

and

The Nightly News."

Both n*y and <n*y> would find the same thing.

But as I mentioned earlier and as shown in Graham's reply, this is more
often not the case.

What specifically are you trying to do?


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


MarkN wrote:
This means that there is no difference between l*g and <l*g>

No it doesnt' say that it limits it to a word.

Grahams says:

<s*t> would find secret and serpent, but not sailing boats and sign
over documents.





However, and maybe Graham should add this, it will find "sailing
boat" and "sign over document" among several other strings in this
sentence.



Again <s anchors the start of a find string to a word starting with
"s" and t> anchors the end of a find string to a word ending with
"t." As illustrated here, the starting word and ending word do not
have to be the same word.







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


MarkN wrote:
Hi Greg,

Doesn't the link to the gmayor website says exactly what I said,
that the <> limts a wildcard search to a word and not a string. Am I
missing something here?

See:
http://www.gmayor.com/replace_using_wildcards.htm

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


MarkN wrote:
Gents,

Thanks for your prompt response, I will give your suggestions a
go. Without sounding ungrateful (!!), I was hoping for something a
little more generic to allow me to use wildcards but only return
whole words as opposed to strings.

I am having other issues where wildcards are not behaving as I
believe they have done in the past. I am currently working on a
quite heavily customised Normal.dot and so could either of you let
me know whether my assertion about what should be found with the
examples in my original question are correct.

Although... that won't match anything starting with a capital L,
since all wildcard searches are case specific. The following
variation should work with capitals as well, and won't match
"long-living":

<[lL][a-z,A-Z]@[gG]>

If he wants hyphenated stuff to match, he could use:

<[lL][! ]@[gG]>

--
Herb Tyson MS MVP
http://www.herbtyson.com
Please respond in the newsgroups so everyone can follow along.
"Greg Maxey" <gmaxey@xxxxxxxxxxxxxxxxxxx> wrote in message
news:%23xOiOZYQGHA.3896@xxxxxxxxxxxxxxxxxxxxxxx
Mark,

Use: <l[! ]@g>

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


MarkN wrote:
Hello,

I was under the impression that if I do a wildard search using
<l*g> it will find words such as 'long' and 'lag' but not 'late
arriving'. When I use the above find criteria I pick up all
three of these examples.

Does anyone know how I can fix this so that I only find
individual words?



.



Relevant Pages

  • Re: Find and Replace
    ... Greg Maxey/Word MVP ... MarkN wrote: ... Again <s anchors the start of a find string to a word starting with ... that the limts a wildcard search to a word and not a string. ...
    (microsoft.public.word.docmanagement)
  • Re: Find and Replace
    ... Greg Maxey/Word MVP ... MarkN wrote: ... of word ending in "g." ... I am having other issues where wildcards are not behaving as I ...
    (microsoft.public.word.docmanagement)
  • Re: Find and Replace
    ... Greg Maxey/Word MVP ... MarkN wrote: ... Without sounding ungrateful, I was hoping for something a little ... I am having other issues where wildcards are not behaving as I ...
    (microsoft.public.word.docmanagement)
  • Re: WildCard Key
    ... But I have a new need to support filenames based on wildcards. ... I'd use a prefix tree aka trie both ... An empty string matches a terminal vertex ... stars that contains at least one star, ...
    (microsoft.public.vc.stl)
  • Re: wildcard woes
    ... Thinking the wildcards would work I try this ... In brief, Filemaker does a word search from the beginning of a word, for any string you put into a field. ... So for your desired searching a single request with "red yellow" in the field will work. ... These might be of assistance if you look them up in the help file and see how they are used in FM. ...
    (comp.databases.filemaker)