I want to test a 4 character test string where each character can be an upper-case letter or a number.

(wcmatch "ABCD" "[A-Z#][A-Z#][A-Z#][A-Z#]") returns T as expected
(wcmatch "aBCD" "[A-Z#][A-Z#][A-Z#][A-Z#]") returns nil as expected
(wcmatch "1BCD" "[A-Z#][A-Z#][A-Z#][A-Z#]") returns nil for some unknown reason

I also tried "[A-Z,#][A-Z,#][A-Z,#][A-Z,#]" and "[#A-Z][#A-Z][#A-Z][#A-Z]" but these didn't work either.

Can anybody tell me what I'm doing wrong?

Any help is greatly appreciated.