Mask a TextField

Hi,
I’m trying to Mask textfield where users will be entering a Post code (UK).

The way they work is
AA9(9/space)(space if prev char was 9)AAA
where ‘A’ is a alphabetic char and 9 is a numeric digit

so either
SA4 7RF or
SA13 7RF etc.

Is there a way to Mask this? In the mask property, all I have is AA9 right now, but not sure how to do the next 2 digits.

Thanks for any help.