Puzzled by wildcard search

P

Paul

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?
 
J

Jay Freedman

Paul said:
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
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
P

Paul

Paul said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top