数字不允许(0-9) - javascript中的正则表达式 [英] numbers not allowed (0-9) - Regex Expression in javascript
本文介绍了数字不允许(0-9) - javascript中的正则表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要正则表达式模式,它允许我任何字符,但它不能允许(0-9)数字?
I wanna regex pattern which allowed me any chars , but it cant allowed (0-9) numbers?
推荐答案
简单:
/^([^0-9]*)$/
该模式匹配任何数量的字符不是 0
到 9
。
That pattern matches any number of characters that is not 0
through 9
.
我建议查看 http:// regexpal.com/ 。它可以让你轻松测试一个正则表达式。
I recommend checking out http://regexpal.com/. It will let you easily test out a regex.
这篇关于数字不允许(0-9) - javascript中的正则表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文