1JS Escape Characters
2\' — Single quote
3\" — Double quote
4\\ — Backslash
5\b — Backspace
6\f — Form feed
7\n — New line
8\r — Carriage return
9\t — Horizontal tabulator
10WebsiteSetup.org - Beginner’s Javascript Cheat Sheet 7
11\v — Vertical tabulator
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"));