I am reading a string ID value from a table. When the ID was input by the user, it was done with an input mask that the user defined, so the mask could have been something
This does exactly what I need. The only downside is that it ties me to the Windows Forms assembly.
MaskedTextBox mtb = new MaskedTextBox("FR999_999999"); mtb.Text = "123456789"; return mtb.Text;