var patt = /^(?=.*[a-zA-Z0-9.!@#&*\-\u0080-\u052F])[a-zA-Z0-9\s.!@#&*',\-\u0080-\u052F]*$/;
console.log(patt.test("\u002f"));
I know that u002f is a forward slash in Unicode. I've tried adding that to the pattern as well as "/" and haven't been able to get it to log true yet.
解决方案
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"));