在asp.net中只输入字母c# [英] enter only alphabets in asp.net c#
本文介绍了在asp.net中只输入字母c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想只使用正则表达式验证输入字母。
请非常紧急
解决方案
你实际上只需 Google [ ^ ]。
使用此:
/ ^ [a-zA-Z] *
/
您可以更改*
到+
,如果你不想允许空的匹配。
参考链接有关正则表达式的更多信息:
JavaScript RegExp对象 [ ^ ]
用JavaScript创建正则表达式 [ ^ ]
常规表达式 [ ^ ]
- Amit
Hi,
I Want to enter only alphabets using Regular Expression validation .
please its very urgent
解决方案
You actually need just Google[^].
Use this:
/^[a-zA-Z]*
/
You can change*
to+
, if you don't want to allow empty matches.
Refer the links for more information on Regex:
JavaScript RegExp Object[^]
Creating Regular Expressions in JavaScript[^]
Regular Expressions[^]
--Amit
这篇关于在asp.net中只输入字母c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文