js中
var regex = /^[^`~·~!!@@##$¥%%^……&&**=+=+[{【{]}】}|、|;:;:'"‘“,<,《.>。》/?、?]+$/;
java 中
String regex = "^[^`~·~!!@@##$¥%%^……&&**=+=+\[{【{\]}】}\|、|;:;:'"‘“,<,《.>。》/?、?]+$";
注意第二个"^"符号是非的意思,可不是校验的特殊字符之一
版权所归: 转载请注明出处;