what you are looking for is something like this ^[A-Z]{2}\\s\\d{2}\\s[A-Z]{2}\\s\\d{4}$
for explanation, the values in the curly brackets are not idices, but number of values.
so, [A-Z]{1,2}
means a value between A-Z at least ond and max two times.
[0-9]{4,5}
means a value between 0 an 9 at least 4 and max 5 times.
also you are missing the white spaces in your regex, if they are mandatory.
\s
defines any white space, the second \
is to escape the other \
.
if the are not mandatory, you can ignore them by a ?
like this ^[A-Z]{2}(\\s)?\\d{2}(\\s)?[A-Z]{2}(\\s)?\\d{4}$
. so they can be there, but do not have to be.