{x,y} Matches x to y number of occurrences of a regular expression. e.g. /\d{2,4}/ matches at least 2 but no more than 4 digits.


Code:
var re = /\d{2,4}/;
document.write(re.test('12345'));
This code outputs, true. Because the string contains 5 digits, shouldn't this output false?