正则表达式验证只能输入中文
【正则表达式验证只能输入中文】 1> 只能输入中文:οnkeyup="value=https://www.it610.com/article/value.replace(/[^/u4E00-/u9FA5]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"
2> 只能输入数字和英文:οnkeyup="value=https://www.it610.com/article/value.replace(/[/W]/g,'')"
onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
推荐阅读
- Python爬虫|Python爬虫 --- 1.4 正则表达式(re库)
- Pytorch学习|sklearn-SVM 模型保存、交叉验证与网格搜索
- 正则匹配
- 人工智能|【机器学习】深度盘点(详细介绍 Python 中的 7 种交叉验证方法!)
- 正则表达式中增加变量
- 解决|解决 win 10 远程桌面身份验证错误问题
- macOS系统上,安装包安装权限不足或验证不过问题
- sed及正则表达式
- Java8|Java8 Collections.sort()及Arrays.sort()中Lambda表达式及增强版Comparator的使用
- IC|数字IC后端真的不如前端设计和验证吗()