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
 
Back
Top