用于捕获字母数字和下划线的正则表达式模式 [英] Regex pattern for catching Alphanumeric and underscore only
本文介绍了用于捕获字母数字和下划线的正则表达式模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请告诉我正则表达式的代码,它只允许:
- 数字
- 字母表
- 下划线
解决方案
尝试这个
^ [a-zA-Z0-9_] *
你可以在下面找到链接< br $> b $ b
http:// stackoverflow .com / questions / 336210 / regular-expression-for-alphanumeric-and -cores [ ^ ]
问候......:)
string pattern = ^ [A-ZA-Z0-9 _] *
Plese tell me the code for regular expression which allows only:
- numbers
- alphabets
- underscore
解决方案
try this one
"^[a-zA-Z0-9_]*
"
you can find link below
http://stackoverflow.com/questions/336210/regular-expression-for-alphanumeric-and-underscores[^]
regards...:)
string pattern = "^[a-zA-Z0-9_]*
这篇关于用于捕获字母数字和下划线的正则表达式模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文