I searched a lot and can\'t find the solution for this RegExp (I have to say I\'m not very experienced in Reg. Expressions).
I would like to test a number between 1
You know about \d, right?
\d
^([1-9]|[12]\d|3[0-6])$
Try this in console:
function test() { for(var i = 0; i < 100; i++) { if (/^([1-9]|[12]\d|3[0-6])$/.test(i.toString()) != (i >= 1 && i <=36)) { document.write(i + "fail"); } else document.write(i + "pass"); document.write(""); } }