Your string does not cover empty string. How do i make the regular
expression so that when the user types text into the textbox, then it should
follow ^\w{3}-\w{3}$ but also allows empty string?
a RegularExpressionValidator will only check non-empty fields. An empty
field always satisfies all the validators, with one obvious exception:
the RequiredFieldValidator.
So you don't have to add code for the "empty" situation, it's the other
way around: if you *don't* want to accept an empty field, add a
RequiredFieldValidator.
Hans Kesting