仅用于字母和数字的正则表达式验证器 [英] Regular Expression Validator for Letters and Numbers only
本文介绍了仅用于字母和数字的正则表达式验证器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
asp.net中仅字母和数字的正则表达式验证器是什么?
What is the Regular Expression Validator for only Letters and Numbers in asp.net?
我只需要输入0-9,a-z和A-Z.我不想允许任何特殊字符使用单引号或双引号等.我正在使用asp.net 3.5框架.
I need to enter only 0-9,a-z and A-Z. I don't want to allow any special characters single or double quotes etc. I am using asp.net 3.5 framework.
我尝试了 ^ [a-zA-Z0-9] + $
和 ^ [a-zA-Z0-9] * $
.他们没有工作.
I tried ^[a-zA-Z0-9]+$
and ^[a-zA-Z0-9]*$
. They are not working.
任何帮助将不胜感激.
推荐答案
尝试以下操作.
^[a-zA-Z0-9]+$
^[a-zA-Z0-9]*$
这篇关于仅用于字母和数字的正则表达式验证器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文