How to represent regex number ranges (e.g. 1 to 12)?
I tend to go with forms like [2-9]|1[0-2]?
which avoids backtracking, though it makes little difference here. I've been conditioned by XML Schema to avoid such "ambiguities", even though regex can handle them fine.
Yes, the correct one:
[1-9]|1[0-2]
Otherwise you don't get the 10.