var patt = /^(?=.*[a-zA-Z0-9.!@#&*\\-\\u0080-\\u052F])[a-zA-Z0-9\\s.!@#&*\',\\-\\u0080-\\u052F]*$/;
console.log(patt.test(\"\\u002f\"));
I
You can escape a /
character, by using \/
.
Using unicode will actually result in the absolute same result, as using the character itself - and therefore will not solve your problem.
It is easy to add a forward slash, just escape it. No need using any character references or entities.
var patt = /^(?=.*[a-zA-Z0-9.!@#&*\-\u0080-\u052F])[\/a-zA-Z0-9\s.!@#&*',\-\u0080-\u052F]*$/;
^
var patt = /^(?=.*[a-zA-Z0-9.!@#&*\-\u0080-\u052F])[\/a-zA-Z0-9\s.!@#&*',\-\u0080-\u052F]*$/;
alert(patt.test("/test"));