OK
I've done the exercise and it behaved pretty much as I expected
All the information you need is included in the question you posted. Cross reference your homework with the following:
BTW there are 186 unique combinations that match the regular expression (^[09]{1,5}[azAz]+$)
There are 248 unique combinations if (as I suspect) the regular expression should have been (^[09]{1,5}[azAZ]+$)