A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Puzzled by wildcard search



 
 
Thread Tools Display Modes
  #1  
Old August 10th, 2009, 08:20 PM posted to microsoft.public.word.docmanagement
Paul
external usenet poster
 
Posts: 406
Default Puzzled by wildcard search

I'm using Word 2003 on Windows XP, trying to search for strings like:

AB-1s
AB-1,2's
AB-2,3a's

I tried the following:

AB-[! ]{1,10}s
AB-?{1,10}s

Neither seem to work, though according to my reading of the Help, it
should. Is there something I'm misunderstanding about the Help, or
does Wildcards just not work as described in the Help?
  #2  
Old August 10th, 2009, 09:34 PM posted to microsoft.public.word.docmanagement
Jay Freedman
external usenet poster
 
Posts: 9,488
Default Puzzled by wildcard search

Paul wrote:
I'm using Word 2003 on Windows XP, trying to search for strings like:

AB-1s
AB-1,2's
AB-2,3a's

I tried the following:

AB-[! ]{1,10}s
AB-?{1,10}s

Neither seem to work, though according to my reading of the Help, it
should. Is there something I'm misunderstanding about the Help, or
does Wildcards just not work as described in the Help?


The problem appears to be the separate letter s at the end of the
expression. Instead, the following seems to do the job:

AB-[! ^13]{1,10}

The ^13 included with the space in the [! ^13] means that the matched text
can't include a paragraph mark.

This is a wrinkle I hadn't seen before. You'll find an expanded discussion
of the wildcard search rules at
http://www.gmayor.com/replace_using_wildcards.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.


  #3  
Old August 10th, 2009, 10:35 PM posted to microsoft.public.word.docmanagement
Paul
external usenet poster
 
Posts: 406
Default Puzzled by wildcard search

On Aug 10, 4:34*pm, "Jay Freedman" wrote:
Paul wrote:
I'm using Word 2003 on Windows XP, trying to search for strings like:


* AB-1s
* AB-1,2's
* AB-2,3a's


I tried the following:


* AB-[! ]{1,10}s
* AB-?{1,10}s


Neither seem to work, though according to my reading of the Help, it
should. *Is there something I'm misunderstanding about the Help, or
does Wildcards just not work as described in the Help?


The problem appears to be the separate letter s at the end of the
expression. Instead, the following seems to do the job:

AB-[! ^13]{1,10}

The ^13 included with the space in the [! ^13] means that the matched text
can't include a paragraph mark.

This is a wrinkle I hadn't seen before. You'll find an expanded discussion
of the wildcard search rules athttp://www.gmayor.com/replace_using_wildcards.htm.


Unfortunately, not having the "s" diminishes the usefulness of the
wildcard search in particular instance. Thanks for the link, though,
it was very informative.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.