I have the following regular expression tested at regex101 and it works there. However, when I try to use it inside the preg_match it doesn't work anymore. The problem is the slash: I tried escaping it but I can't get it working.
preg_match("/[<>\\\"'%;()&]/", "my\string");
The set of characters that I should match are:
< > \ " ' % ; ( ) &