Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要防止用户输入汉字。我的代码:
/^[^\u4E00-\u9FA5]^$/;
结果是,输入必须是汉字输入而不是阻止。我的代码有什么问题??
尝试
chiregex: /^[^\u4E00-\u9FA5]*$/