Nice Regular expression for text input

by Ali Raza Zaidi on March 6, 2009

i found a use full regular expression vaildating input string, you can use it to filter sql injection attacks while taking input for username, title ect.

^[a-zA-Z]+(([.- ][a-zA-Z0-9 ])?[a-zA-Z0-9]*)*$

Comments on this entry are closed.

Previous post:

Next post: