[英]Regular expressions in asp.net c#
I have a simple query.我有一个简单的查询。 I am new to regular expression validations in C#.
我是 C# 中正则表达式验证的新手。
I want some expression which would allow only single alphabet that means az or AZ.我想要一些只允许表示 az 或 AZ 的单个字母的表达式。 It should not allow whole word.
它不应该允许整个单词。 Can anyone suggest me an expression?
谁能给我一个表达方式?
The following should work:以下应该有效:
[a-zA-Z]+
This expression allows one or more characters in the specified range.此表达式允许指定范围内的一个或多个字符。 And if you want only a single character:
如果你只想要一个字符:
[a-zA-Z]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.