472,146 Members | 1,415 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

Disallow space using regular expression validator

I am building a form in asp.net 2.0
On one of the textboxes, I don't want that the user will use the space
character.
How do I disallow space using regular expression validator (or other
validator) ?

Thanks

ra294


Nov 15 '06 #1
1 17081
The regular expression for no spaces is this one

^[a-zA-Z0-9]+$

or preferable this one

^[^\s]+$
--
Bits. Bytes.
http://bytes.thinkersroom.com
------------------------------
"Zorik" wrote:
I am building a form in asp.net 2.0
On one of the textboxes, I don't want that the user will use the space
character.
How do I disallow space using regular expression validator (or other
validator) ?

Thanks

ra294


Nov 15 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by UndoMiel | last post: by
16 posts views Thread by simonc | last post: by
reply views Thread by Saiars | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.