This becomes a bit more complicated if you allow the number anywhere in the input and if you allow other characters like operators to touch them. Is that what you want?

Here's a terrible, terrible solution for that problem:
Code:
if ($regex($1-,/(^|[^\.\d])0*[1-9]|\.[5-9]/S)) {

Last edited by Loki12583; 23/07/14 12:21 AM.