Hi All,
I have need Regular expression for validation Like
/az-Az/
means before and after word , should be forward slash.
Thanks,
Shiwendra
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.
VulpesPosted Jul 25, 2014, 10:45 AM
The output is:
Posted Jul 28, 2014, 3:15 AM
Thanks , it work for rme
Posted Jul 25, 2014, 9:33 AM
it work for /John/ but does not work for /John Doe/. so please help for both scenario. Thanks,
VulpesPosted Jul 23, 2014, 12:13 PM
string regExp1 = "^/[a-zA-Z]+/$";
and this one will do the same thing except that a word can also now include digits and the underscore character:
string regExp2 = @"^/\w+/$";
The corresponding expressions for multiple consecutive words would be:
string regExp3 = "^(/[a-zA-Z]+)+/$";
string regExp4 = @"^(/\w+)+/$";
Khan Abrar AhmedPosted Jul 23, 2014, 12:05 PM
/[a-zA-Z]+(([\'\,\.\-][a-zA-Z])?[a-zA-Z]*)/