Can anyone tell me the regex for excluding numbers and special characters in ASP.NET?
Solution 1
Try the following: ^[a-zA-Z]*$
Solution 2
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
Hemant Kumar
Passionate about developing community, evangelizing technology and, giving enthusiastic technical presentations with exceptional skills at developing and fostering personal relationships. Having working professional having 7+ years of experience on .NET technologies like C#.NET,VB.NET,ASP.NET MVC,jQuery,JavaScript,HTML,AngularJs and CSS. I can do this task with in the given time-line as per the requirement. Beyond application development, I am skilled in high-level requirements gathering, risk analysis, technical design analysis, application modelling, implementation planning, and support.
Updated on June 04, 2022Comments
-
Hemant Kumar almost 2 years
How do I get the regular expression for excluding special charaters and numbers? Thanks in advance.
-
Fredrik Mörk about 13 yearsHow do you define "special character". Is
é
a special character? How about商
? -
Kobi about 13 yearsIs space a spacial character? The question would be much more answerable with a few valid/invalid examples.
-
Cody Gray about 13 yearspossible duplicate of Regular Expression for alphanumeric and underscores
-
Hemant Kumar about 13 yearsThe special charaters are here " ( )[ ]{ }*& ^ % $ # @ !" please privide me the solution
-