I need to validate some user input, to ensure a number entered is in the range of 1-99 inclusive. These must be whole (Integer) values
Preceeding 0 is permitted, but opt
Why is regex a requirement? It is not ideal for numeric range calculations.
Apache commons has IntegerValidator with the following:
isInRange(value, 1, 99)
In addition, if you're using Spring, Struts, Wicket, Hibernate, etc., you already have access to a range validator. Don't reinvent the wheel with Regular Expressions.