限制用户仅输入特殊字符和数字

Restrict users from entering special characters and numbers only

本文关键字:特殊字符 数字 输入 用户      更新时间:2023-09-26

我正在使用这个正则表达式:

/^[a-z,A-Z ]+$/i.test( value );

我一次只需要限制特殊和数字。 应该允许mango123#@,但&^%123不应该。

试试这个正则表达式 https://regex101.com/r/bX1dO3/1

 /^[a-z,A-Z ].*$/i
相关文章: