hi
refer this
function test1(str) {
return /^ *[0-9]+ *$/.test(str);
}
function test2(str) {
return /^\d+$/.test(str);
}
function test3(str) {
return /^\d{3,5}$/.test(str);
}
follow
http://stackoverflow.com/questions/308122/simple-regular-expression-for-a-decimal-with-a-precision-of-2
http://regexlib.com/DisplayPatterns.aspx?cattabindex=2&categoryId=3&AspxAutoDetectCookieSupport=1