I want user only input 0-9 and only once \".\"
patt = /[^0-9(.{1})]/ 1.2222 -> true 1.2.2 -> false (only once \'.\')
help me , t
You can use is_numeric() with the caveat that it accepts a bit more than one usually wants (e.g. 1e4).
1e4