Masked Edit Control in C# using Regex
By Michael J. Bullard
We programmed a masked textbox control with C# that will convert the mask into a regular expression for each character in the field. It is designed to accept a user defined mask or a regular expression that defines each character in the field. If you pass it the mask as a string using the characters listed below, it will build the regular expression for you. It then loads the regular expression into an array which is used to validate and control the behavior of the field. There is an error provider message and a tooltip associated with the control. Read more…

