Check if character exists in string

  • Thread starter Thread starter Lars Brownies
  • Start date Start date
L

Lars Brownies

I want to check if a string contains any of the following characters:
\/:*?"<>|#
What's the easiest way to do this?

Thanks,

Lars
 
I want to check if a string contains any of the following characters:
\/:*?"<>|#
What's the easiest way to do this?

Thanks,

Lars

A LIKE query:

If string LIKE "[\/:*?"<>|#]" Then
 
Thanks John! Works like a charm.

I had to add 2 asteriks and an extra ".
If str Like "*[\/:*?""<>|#]*" Then

Lars

John W. Vinson said:
I want to check if a string contains any of the following characters:
\/:*?"<>|#
What's the easiest way to do this?

Thanks,

Lars

A LIKE query:

If string LIKE "[\/:*?"<>|#]" Then
 

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