-
December 22nd, 2005, 09:43 PM
#1
How to validate using RegularExpressionValidator
Hi everyone,
I'm using ASP.NET and i designed a page which contains many text boxes. I've used RegularExpressionValidator for validation.
Now i want to validate a text box which should accept alphabets (a-z and A-Z), comma(,), dot(.), open bracket((), close bracket()), blank space and hypen(-) in any order.
eg. SD.RE - (ad.sd., sd.we.,)
To accept all these characters, how to write a expression.
Can anyone help me.
-haifriends.
-
December 23rd, 2005, 11:30 AM
#2
Re: How to validate using RegularExpressionValidator
This is ur need:
Expression
((\w|\W)(\w|\W)(.))*
Ok good luck.
-
December 23rd, 2005, 08:45 PM
#3
Re: How to validate using RegularExpressionValidator
Originally Posted by hany_3210
This is ur need:
Expression
((\w|\W)(\w|\W)(.))*
Ok good luck.
Thank you.
This accepts only 3 characters, but i need expression that accepts more than 3 characters. Characters should not accept numbers(0-9), special characters such as #, @, $, %, !.....
Should accept alphabets, space, hypen(-), dot(.), comma(,), open bracket and close bracket.
Can anyone help me.
-haifriends.
-
March 17th, 2007, 09:56 AM
#4
Re: How to validate using RegularExpressionValidator
I'm not sure if it works but try this simple regular expression: [A-Za-z,.()- ]*
-
March 17th, 2007, 11:22 AM
#5
Re: How to validate using RegularExpressionValidator
why dont you go to the Regex Library Website. theres literally thousands of Regex expressions catalogued and there is a regex tester, its certinally more helpful than posting messages to an unrelated forum trying to get your answers.
http://regexlib.com/
hth,
mcm
rate my posts!
mcm
-
October 27th, 2010, 01:58 AM
#6
Re: How to validate using RegularExpressionValidator
As post regarding Regular Expression Validator, I kindly request you let me know which code is exactly match to you validation string......
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|