Contextual Lookups for Ordinals


I have this lookup for ordinals. It works OK for 1st, 2nd, 3rd, 4th, etc., and for Caps, 1ST, 2ND, 3RD, etc., but not for ordinals in French or Spanish, which use one or three ordinals e.g. 2º or 1ème.

How can I change my code to cater for one or more alpha characters after the digits? One to three superscripts would be OK, but I think one or more would be more flexible.

feature Ordinals ordn {
lookup Ordinals;
group @Digits [zero-nine];
group @Alphas [A-Z a-z];

lookup Ordinals{
context (@Digits) @Alphas @Alphas;
sub 0 Super;
sub 1 Super;
} lookup Super {
sub [A-Z] -> [uniEAA1 - uniEABA];
sub [a-z] -> [uniEAC1 - uniEADA];

I am using [[http://home.kabelfoon.nl/~slam/fonts/otcomp.html|OpenType Compiler]].