4

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

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Hemant Kumar
  • 4,593
  • 9
  • 56
  • 95

2 Answers2

6

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

Oleks
  • 31,955
  • 11
  • 77
  • 132
Jess
  • 2,991
  • 3
  • 27
  • 40
4

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

bw_üezi
  • 4,483
  • 4
  • 23
  • 41