Wildcard search fails

M

Morgan

I am using Word 97 SR2 and I wanted to set up a wildcard
search. Word reported the search unsuccessful. After
further investigation it seems to be having a problem with
a search construct of the form [!]{}, as follows:

search text: andzandx

a[!z]{2}x
a[!z]{1,2}x

These expressions find the substring 'andx' as expected.

a[!z]{2,3}x
a[!z]{1,3}x
a[!z]{1,}x

These expressions all fail. (Not expected!)

I ran an internet search to see if this is a known bug,
but found nothing. Surely the latter 3 expressions should
also find 'andx'. Can anyone help?

Morgan
 
M

Mike Williams [MVP]

Morgan said:
I am using Word 97 SR2 and I wanted to set up a wildcard
search. Word reported the search unsuccessful. After
further investigation it seems to be having a problem with
a search construct of the form [!]{}, as follows:

search text: andzandx

a[!z]{2}x
a[!z]{1,2}x

These expressions find the substring 'andx' as expected.

a[!z]{2,3}x
a[!z]{1,3}x
a[!z]{1,}x

These expressions all fail. (Not expected!)

I ran an internet search to see if this is a known bug,
but found nothing. Surely the latter 3 expressions should
also find 'andx'. Can anyone help?

Could you please clarify the point of your wildcard search? You indicate the
expressions you have attempted, but not the goal.
 
M

Morgan

Could you please clarify the point of your wildcard
search? You indicate the
expressions you have attempted, but not the goal.
OK, the reason I came across this was that I am trying to
pick out and modify certain statements in a file. These
start with an 'A' and end with a ';' and are of variable
length. I am only interested in lines which do NOT contain
quote character(s).

The expression 'A*;' will obviously find all the
statements within the file. The simplest way to pick out
the lines I want would be 'A[!']{1,};' - but this doesn't
work in my version of Word! I'm just surprised I can't
find anything on this bug.
 

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