1var format = /[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/;
2// ^ ^
3document.write(format.test("My@string-with(some%text)") + "<br/>");
4document.write(format.test("My string with spaces") + "<br/>");
5document.write(format.test("MyStringContainingNoSpecialChars"));