Hi,
I have a smal script which checks for the amount of figures either side of a decimal point:
decReg = "^[0-9]{"+lmin+","+lmax+"}\\.[0-9]{"+rmin+","+rmax+"}$"
lmin & lmax; define the amount of number that have to be on the left side of the point
rmin & rmax; same as above, but for the right side.
What I need to know, the above script makes the user enter the "." even if they put in a round figure, how can I change the above to mean: "only check the right hand side if the decimal point exists" ???
Thanks,
Mark
I have a smal script which checks for the amount of figures either side of a decimal point:
decReg = "^[0-9]{"+lmin+","+lmax+"}\\.[0-9]{"+rmin+","+rmax+"}$"
lmin & lmax; define the amount of number that have to be on the left side of the point
rmin & rmax; same as above, but for the right side.
What I need to know, the above script makes the user enter the "." even if they put in a round figure, how can I change the above to mean: "only check the right hand side if the decimal point exists" ???
Thanks,
Mark