The numbers of the range from 1 to 31 can be split into two groups: one digit numbers (1–9) and two digit numbers (10–31). And the latter can further be split into whole decades (10–29) and partial decades (30–31). These can be expressed as follows:

[1-9]|[12][0-9]|3[01]

And to match only whole numbers and not just parts of them, you could use look-around assertions: