1?[1-9]?\d
[12][0-4]\d
25[0-5]
Some wrong code : 1?\d?\d|2[0-4]\d|25[0-5] and \d{1,2}|1\d\d|2[0-4]\d|25[0-5] both includes 00-09
1?\d?\d|2[0-4]\d|25[0-5]
\d{1,2}|1\d\d|2[0-4]\d|25[0-5]