Range out of order in character class 正则表格式
来源:互联网 发布:mysql从excel导入数据 编辑:程序博客网 时间:2024/06/11 23:22
使用正则表达式控制用户输入内容,
new RegExp("[^\a-\z\A-\Z0-9\~\-\!\@\$\^\*\(\)\=\}\|\{\[\]\:\<\>\/\.\,]","g")
但是浏览器报错:Range out of order in character class
原来是 ‘ \- ’ 的问题,使用 ' \\- ' 替换 ‘\-’ 就可以了
‘ \ ’ 表示转义
‘ \\ ' 表示一个 ' \ '
参考:http://stackoverflow.com/questions/17727884/range-out-of-order-in-character-class-in-javascript
1 0
- Range out of order in character class 正则表格式
- invalid range in character class
- Filedescriptor out of range in select
- Access out of range
- pointerIndex out of range
- Commenting out a range of lines in VIM
- BIGINT UNSIGNED value is out of range in..的解决方法
- one of arguments' values is out of range (index is out of range) in function cvPtr2D,c:\\
- Out-of-order execution
- E:in-range伪类选择器与E:out-of-range伪类选择器
- vector subscript out of range
- vector subscript out of range .
- list index out of range
- RangeError: index out of range
- vector subscript out of range
- pointerIndex out of range--IllegalArgumentException
- An out-of-range value
- string subscript out of range
- POJ 3368
- 关于安卓面试题的部分整理。
- CF 545C
- HDU 5446
- HDU 5033
- Range out of order in character class 正则表格式
- Light Oj 1003
- 信号
- LightOJ1004
- Android新手入门2016(6)--客户端编程思想的初步思考和Android学习路线
- PHP常用函数
- linux 系统中tomcat服务加入开机启动项
- IOS中block和代理
- 手机访问pc网站自动跳转手机端网站html5代码