Regex is not a good solution - it is a text matching system, not a number matching.
It could be done with a regex, but it would be realy silly: it would have to include all the cases that are allowed, each spelt out:
^(1|2|3|4|5|6|7|8|9|10|11|...|23|24|25)$
Which is plain stupid. You are better off handling this kind of thing in code!