Menu
Hi
I am having a problem with regular expressions. Here is a chunk
[code]
var latVal = form.newLatitude.value;
var latFormat = new RegExp(“^d{1,3}.d+$”);
if(latFormat.test(latVal)==false) {
alert(“Please check the format of Latitude”);
return false;
}
When i give an input of 12.22 to the latitude textfield, I still get the message : Please check the format of Latitude. The regular expression seems perfect, i also checked it with a tester. What is the problem? thanks