Expresso is good free tool to test regular expressions and it can be downloaded from
http://www.ultrapico.com/Expresso.htm[
^]
In Windows forms, Validating event of control can be used to test the required string with Regex.IsMatch method for the required pattern. If it fails then set e.Cancel = true else set e.Cancel = false
For the pattern mentioned in the question the following regular expression can be used
^[a-zA-Z]{5}\d{4}[a-zA-Z]$