Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 28, 2007 11:43 AM by moonsrisun
Member
521 Points
150 Posts
Apr 10, 2007 06:56 PM|LINK
I'm trying to use a Regular Expression Validator that allows only Alphanumeric characters and spaces.
My expression "^[0-9a-zA-Z]+$" seems to be working only if there are no spaces. How do I modify the expression to allow Space?
Thanks.
All-Star
21838 Points
4822 Posts
Apr 10, 2007 07:57 PM|LINK
Try adding a space in the expression like this:
"^[0-9a-zA-Z ]+$"
bullpit
Star
8849 Points
1822 Posts
Apr 10, 2007 08:03 PM|LINK
2 Points
8 Posts
May 28, 2007 11:43 AM|LINK
Try this
validationexpression="[0-9a-zA-Z' ']{5,}
This code will accept Alpha, Numeric and space. Also it will check minimum of 5 characters should be entered.
ubelt
Member
521 Points
150 Posts
Regular Expression Validator: Allow Alphanumeric Characters and Space Only
Apr 10, 2007 06:56 PM|LINK
I'm trying to use a Regular Expression Validator that allows only Alphanumeric characters and spaces.
My expression "^[0-9a-zA-Z]+$" seems to be working only if there are no spaces. How do I modify the expression to allow Space?
Thanks.
bullpit
All-Star
21838 Points
4822 Posts
Re: Regular Expression Validator: Allow Alphanumeric Characters and Space Only
Apr 10, 2007 07:57 PM|LINK
Try adding a space in the expression like this:
"^[0-9a-zA-Z ]+$"
bullpit
Max
Let Me Google That For You!
MorningZ
Star
8849 Points
1822 Posts
Re: Regular Expression Validator: Allow Alphanumeric Characters and Space Only
Apr 10, 2007 08:03 PM|LINK
moonsrisun
Member
2 Points
8 Posts
Re: Regular Expression Validator: Allow Alphanumeric Characters and Space Only
May 28, 2007 11:43 AM|LINK
Try this
validationexpression="[0-9a-zA-Z' ']{5,}
This code will accept Alpha, Numeric and space. Also it will check minimum of 5 characters should be entered.