How can I check whether a variable contains one of several characters, e.g. several types closing quote marks? (Like ’, ”, " etc.)
You can do it using regular expressions. Put the quote characters in between an open square bracket and a close square bracket, like this:
NOTE: If you try this with other characters, there are some characters that have to be "escaped" by preceding them with a backslash \
when you put them inside the brackets. When in doubt, experiment at regex101.com.
1 Like