I need to prevent user from entering the following set of chars: ~ " # % & * : < > ? / \ { | } .
Important is that, anything else will be allowed, but only the characters shown above will be forbidden.
Currently, I'm using the following regex but this does also forbid for example ! sign.
private static folderRegex = /^[A-Za-z0-9_-]+[ßüÜöÖäÄ\w]*$/;