Microsoft Developer
Microsoft Developer

Reputation: 5459

Regular field expression to validate alpha-numeric values,@and dot

How can I customize regular expression to allow alpha-numeric values,@ and dot. I want this expression for the field user name. So it should allow only those values that are present in usual usernames. Thanks in advance...

Upvotes: 0

Views: 2243

Answers (1)

Muhammad Akhtar
Muhammad Akhtar

Reputation: 52241

What you're asking for in your question is:

ValidationExpression="^[a-zA-Z0-9.@]{0,25}$"

But I would suggest you to use this one:

xyz\\\\[a-zA-Z]\d[a-zA-Z]\d{4}

Upvotes: 1

Related Questions