Text box validation using regular expression
<p>I have a textbox and have to use the regular expressions in asp.net </p>

<p>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.</p>

<h2>Output should be:</h2>

<p>India Bangalore -valid
India Bangalore - not valid
!India bangalore - valid
India bangalore!@#$%- valid
IndiaBangalore - valid </p>

<p>i.e : use can enter the spaces in between the words but not in first position and last position.</p>

<p>Java script  also fine.</p>

<p>Thanks in advance.</p>
