Exact results using wildcards

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using query builder to look for all records in a column that contain the
word "free"
I'm using *free* in the criteria line which returns records containing
"free" but also "freedom". "freely" etc.
I tried "*free *" (a space after free) that doesn't work since it doesn't
return any records that end with the word free.
Any help with just finding the word and not words containing the word would
be much appreciated.
thanks
 
Like * free * (* space free space *) will return any records with the 'word'
free in the field
Like *free * (*free space *) will return any records with the word free and
all that end with free.
Like *Free* will return any record containing the character string free.

Ed Warren
 
Any help with just finding the word and not words containing the word would
be much appreciated.

ummm...

"Free"

on the criteria line.

If you don't want wildcard functionality, don't use wildcards!

Am I missing something?

John W. Vinson[MVP]
 
Using the LIKE operator you need to do it three times, for beginning,
middle and end of the field, taking into account all the characters
other than spaces that might adjoin the word, e.g. (air code)

LIKE "*[ ""'({[]free[] .,;:?!""')}]*"
OR LIKE "free *"
OR LIKE "*[ ""'({[]free"

Or use the rgxValidate function at
http://www.mvps.org/access/modules/mdl0063.htm, with a pattern of

\bfree\b

to match <word boundary> f r e e <word boundary>
 
3 times worked! thanks

John Nurick said:
Using the LIKE operator you need to do it three times, for beginning,
middle and end of the field, taking into account all the characters
other than spaces that might adjoin the word, e.g. (air code)

LIKE "*[ ""'({[]free[] .,;:?!""')}]*"
OR LIKE "free *"
OR LIKE "*[ ""'({[]free"

Or use the rgxValidate function at
http://www.mvps.org/access/modules/mdl0063.htm, with a pattern of

\bfree\b

to match <word boundary> f r e e <word boundary>

I'm using query builder to look for all records in a column that contain the
word "free"
I'm using *free* in the criteria line which returns records containing
"free" but also "freedom". "freely" etc.
I tried "*free *" (a space after free) that doesn't work since it doesn't
return any records that end with the word free.
Any help with just finding the word and not words containing the word would
be much appreciated.
thanks
 

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

Back
Top