HI everyone,
I want regular expression for allow alphabetics and space only.
Regards,
Jeevan
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
jeevan mummadiPosted Sep 30, 2010, 5:17 AM
I am using below expression. But i am getting this error -->Unrecognized escape error at '\s'
Regex objAlphaPattern = new Regex("[a-zA-Z][a-zA-Z\s]+");
return (!objAlphaPattern.IsMatch(strVal));
Regards,
Jeevan.
Gomathi PalaniswamyPosted Sep 28, 2010, 8:03 AM
try this expression
[a-zA-Z][a-zA-Z\s]+