hi , i have a html text box which should allow only numerics. how can i do this using preg_match() plz help me. prasad
This will match a string of one to eight digits. You need to decide if leading or trailing whitespace is allowed, and if you need to limit the length of the string (what if someone tries to enter a number thousands of digits long?).
/\d{1,8}$/
hi tnx for that,i ha ve resticted the length of the filed to 8.so no probs. any way can u give me the complete syntax.supposing my text filed name is $phone.