I'm having problem with JavaScript regular expressions. I want to match real numbers form 1 to 5. Precission is in two digits. My code is but it doesnt work.
function validate_prosjek(nmb)
{
var pattern= new RegExp(/[1-4]\.[0-9][0-9]|5\.00/);
return pattern.test(nmb);
}
It recognizes real numbers higher than 5.