I agree that if a new appearance were added, there would immediately be requests to configure it in different ways. If a contributor wanted to design a specification for this and implement the feature, it would likely be welcome. There may be some overlap with Form design: grid of text or numeric input which also relates to adding flexibility to how text fields are displayed in relation to each other.
In the mean time, I would strongly recommend the regex approach, @ThomasKraft. You can even include a warning on the same screen to make it easier for users to follow. See this example form in which a red error message is displayed until the desired format is used.