> I don't know the java regular expressions sintax, but
> in other languages exists the special character
> \W that matches a non-word character(same as
> [^a-zA-Z_0-9]).
> Can it solve the problem?
No because the character class \W consists of much more than the OP's five characters: / ? \ = # (unless those five were just an example of the OP)