This seems to work, though it doesn't accept leading zeroes:

//var %x ^([1-9]|2[1-2])$ | echo -a $regex(22,%x)