I want to validate number in range of 0-255
I have this expression
\'/^([0-1]?[0-9]?[0-9])|([2][0-4][0-9])|(25[0-5])$/\'
But this a
^(([0-9]|[1-9][0-9])|[1][0-9][0-9]|[2][0-5][0-5])$ this works for 0-255 meaning no leading zeros such as 001
^(([0-9]|[1-9][0-9])|[1][0-9][0-9]|[2][0-5][0-5])$
I know this has been answered, but I needed a similar regex for page routing; except for the range of 1-66. This worked well: /^(?!67|68|69)[1-6][0-9]|[1-9]$/