I was trying to make a database for my pollution testing centre. It requires the registration number of vehicles. In india the normal format of vehicle registration number is
AB 12 XY 1234 or AB 12 1234 or AB 12 X 1234
Where AB denotes the first two letters of respective states and the coming 12 denotes the two digit number of respective registration office. The letters XY and 1234 denotes the number of specific vehicle (it varies). But for new registration offices, the letters XY may be missing or may be X only.
How can I make an input mask that can withstand all these conditions?