I will admit i know nothing about regular expressions. what I am trying to do is use a variable as part of a regular expression. I want a validation to occur on each character input, which it does, and only allow character between 1 and n, n can be any number from 1 to 999, how do I do that? 1, 2, 3, 15, 23, 500 are all valid whereas 003, 0, 3t3 are all invalid.
thanks, R.
This should do it:
^([1-9]|[1-9][0-9]|[1-9][0-9][0-9])$The trick is to think of the problem as a series of digits evaluated one at a time instead of one whole number.
Enjoy!