Regular Expressions via JavaScript or Regular Expression Validators!
Have a look at what they are
here.[
^]
There are various online free tools to prepare/check your regular expression. Pick one. prepare your regex and apply on the textbox onchange/onblur event of textbox using Javascript or Regular Expression Validators.
Have a look here for second option if thats confusing for you:
How To: Use Regular Expressions to Constrain Input in ASP.NET[
^]