Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
Text box validation using regular expression
October 22, 2011
I have a textbox and have to use the regular expressions in asp.net
My text should not allow the spaces in first and last place. In between words it can allow.
that means: it should allow alphabets, numbers and all special characters.
Output should be:
India Bangalore -valid
<space>India Bangalore<space> - not valid
!India bangalore - valid
India bangalore!@#$%- valid
India<space>Bangalore - valid
i.e : use can enter the spaces in between the words but not in first position and last position.
Java script also fine.
Thanks in advance.
Posted Date: October 24, 2011 Points: 20
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
Regards, Lakshmi Naraayanan.S
Posted Date: November 18, 2011 Points: 20
Refer www.regexlib.com it will help you build the regex.
To post reply
Related Questions Related Questions
Regular Expression for Alphanumeric only for input control
Regular expression validator
Regular expression validator for string and white spaces
Regular expression validator for phone number
Regular Expression in ASP.Net
validation of a text box
Linking the Numbers Using Regular Expression
How to write to a text file in C#
Latest Forum Questions From The Same Category
how to learn and Where can i Learn about ASP .Net
Slash(/) in Combobox
attaching the report in the web page
How do i get payment status in redirect page using bitpay?
Login with Facebook and Save details in database
Login with facebook account in my website
How to make a nested datalist control?
What class does Icon derive from?
What are the validation controls?
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend