Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can anyone tell me the regex for excluding numbers and special characters in ASP.NET? [closed]

Tags:

regex

asp.net

How do I get the regular expression for excluding special charaters and numbers? Thanks in advance.

like image 502
Hemant Kumar Avatar asked Dec 27 '22 22:12

Hemant Kumar


2 Answers

Try the following: ^[a-zA-Z]*$

like image 139
Jess Avatar answered Jan 30 '23 14:01

Jess


possible regex

[^()[\]{}*&^%$#@!]+

this will match anything but ()[]{}*&^%$#@!

the [^...]+ is a "any character except ..." and the ] must be escaped with \]

http://www.myregextester.com/?r=37f5dfd3

like image 43
bw_üezi Avatar answered Jan 30 '23 14:01

bw_üezi