Not 100% sure (I haven't worked with TDM for two years now), but I fear that TDM can't do that with any of the standard rules.
You probably have to set up your own advanced rule to achieve this. Whether this is sufficient depends (among other details) on whether masking must be repeatable in these cases.
Thanks for responding. Yes the masking should be repeatable in these cases.
One way to achieve this would be to use the key masking technique twice. Pass the input to the first data masking transformation with key masking and configure it to mask only the numbers in source string characters using only numbers in the result string replacement characters. Pass the output of this to another data masking transformation with key masking but this time mask only alphabets using only alphabets. Write this as a mapplet in PowerCenter designer, export as xml and use it to create the rule in TDM. Hope this helps.
Thanks @Mukesh. This helps.