使用a-z和A-Z 0-9以及下划线和破折号的正则表达式 [英] regular expression that will take a-z and A-Z 0-9 and underscore and dash
本文介绍了使用a-z和A-Z 0-9以及下划线和破折号的正则表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在Windows窗体中创建用户名字段.
我找到了很多正则表达式,但效果不好.
我找到了此正则表达式^ [a-z0-9 _-] {3,16} $
取值范围是3个字符到16个字符.但这不是大写字母.
我不是正则表达式专家.我在我给定的正则表达式中添加了该代码.
谁能帮帮我
在此先感谢
i am making a username field in windows form.
i have find many regex but result is not good.
I have find this regex ^[a-z0-9_-]{3,16}$
which is taking value between 3 character to 16 characters. But it is not taking uppercase letter.
I am not a regex guru. Niether i added that code in my given regex.
Can anyone help me out
thanks in advance
推荐答案
取值范围是3个字符到16个字符.但这不是大写字母.
我不是正则表达式专家.我在我给定的正则表达式中添加了该代码.
谁能帮帮我
在此先感谢
which is taking value between 3 character to 16 characters. But it is not taking uppercase letter.
I am not a regex guru. Niether i added that code in my given regex.
Can anyone help me out
thanks in advance
如何:
[a-zA-Z0-9_-]
也看看这个:
Expresso-用于构建和测试正则表达式的工具 [ ^ ]
How about:
[a-zA-Z0-9_-]
Take a look at this too:
Expresso - A Tool for Building and Testing Regular Expressions[^]
这篇关于使用a-z和A-Z 0-9以及下划线和破折号的正则表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文