Steps:
1. Add a onchanged client event to textbox on client side using Attributes.
2. Refer a JS function to the event
3. Pass textbox or textbox value to event method
4. Validate the data using regex or crude way
Something like:
TextBox4.Attributes.Add("onchange","javascript: ValidateMe(this);");
<script type="text/javascript">
function ValidateMe(curr) {
}
</script>