I'm trying to get a regex to match UK Ham Radio Callsigns which can be in the following formats - honestly I do not know where to start
Callsigns start with either G, M or 2. If the 1st character is G or M it can be followed with a number or M, W, I, J, U, B, Z, S, T, X. If the 1st character is 2 then the second could be E,M,W,I,J,U followed by another number (1 or 0).
After the second or third character (3rd if starts with 2, second or third if starts with M or G) there will be 1 to 3 letters.
The second character indicated the region of the UK, some examples
G1XXX - England
2e1XXX - England
M6xxx - England
Scotland - GM1XXX or 2M0XXX or MM3XXX
Wales - GW7XXX or 2W1XXX or MW0XXX
The other letters re[resent other regions.
The First number following G or M can be 0-9 as can the number following an initial 2.
I can't work out where to start untangling this and would appreciate any help from a REGEX guru.
The reason for this is to work out if a signup username is arbitary or a UK Callsign.
Kind regards
Mike GM1WKR