I have been trying to generate a two-letter code from a subset of the upper case alphabet.
For the whole alphabet I could have used [:upper:]{2} but because it’s a subset I tried this:
(A|B|D|E|F|G|H|J|L|N|P|Q|R|S|T|U|W|X|Y|Z){2} which seems to be the same approach as your example.
I only get a selection from the end of the list and not from the whole. I didn’t find the GitHub regex info very helpful. A full discussion of this variant of regex might do it.
Meanwhile I’ve done something very crude…
rand1 = “ABDEFGHJLNPQRSTUWXYZ”.slice(random(0,19),1)
rand2 = “ABDEFGHJLNPQRSTUWXYZ”.slice(random(0,19),1)
twoletters = rand1+rand2