Wildcards and non-Alphanumeric characters

Is there a wildcard that seeks out non-alphanumeric characters in the same way that “?” is specific to letters and “#” is specific to numbers?

I’m wanting to find any company names in our database which use non-alphanumeric characters - I’m using Access to do the searching, if that makes a difference…

Thanks in advance

In the Microsoft Access Help, search for “wildcard character.”

My PC has Access 2003, and the following is what I get in the help file. I think you would want to do [!?#].

Nice idea - except that it doesn’t work. :frowning: I get all the records returned by that search. I think the problem is that is this also returns spaces, and most company names have at least one of those…

I’m not really familiar with Access searches, but did you try putting a space in the brackets? As in [!?# ]

Yeah - I thought of that, but it didn’t work either… not sure why not though…


I don’t have MSAccess here, and was never an expert anyway, but my first thought would be something like [^a-zA-Z0-9 ], i.e. find characters that aren’t alphanumeric. I don’t know if multiple ranges in the same condition will work. (Note that the space is in there now, as dlack pointed out. Preview is your friend!)

You sir, are da MAN!! [sub]replace male with female where appropriate[/sub]

That’s cracked it - thanks everyone…


Ah, so it’s the ANSI-92 instead of the ANSI-89 … whatever that means. : )

Yes, “da MAN” is right. :cool:

Actually, I’m a little surprised that MSAccess is so close to old-style Unix regular expressions. I did stuff like this long, long ago in a land far away, and I’m also a little surprised that I remember any of it. But for what I was doing, character ranges showed up a lot, and it was also often handy to turn conditions around.

No, I needed to replace the ^ with a ! to get it to work, but the rest of it was spot on!!