I am trying to check if a users input contains any special characters from a list, does anyone know who I would go about doing this?
I’ve tried the LIKE operator:
Dim sMatch As Boolean = tTitle.Text Like "[-/\,.:;*?""""<>|&'[]^%£$()_+=!#]"
but doesn’t seem to work, i think special characters are used for settings.
Is there a RegEx i could use for this??
Thanks for any help.
J.
IndexOfAny and ToCharArray will help here
edit: Some of those characters have to be wrapped in their own square brackets for the like to work, plus you’d need some *’s around the [], and you’d have trouble square bracketing the ] itself – Like Operator (Visual Basic) 🙂