You are here

Regular Expression, 3 digi number, only 5 times' numbers are allowed

Blog Terms: 

Number from 0-999, only 5 times' numbers are allowed: 0, 5, 10, 15, 20... 995
The following is the test in javascript:


var reg = new RegExp('^(\\d{0,2}[0,5])$');
alert(reg.test('123'));