Regex less than or greater than 0 -


i'm trying find regex validates number being greater or less 0.

it must allow number 1.20, -2, 0.0000001, etc...it can't 0 , must number, means can't 0.00, 0.0

^(?=.*[1-9])(?:[1-9]\d*\.?|0?\.)\d*$ 

tried not allows negative

also tried something:

-?[0-9]*([1-9][0-9]*(\.[0-9]*)?|\.[0-9]*[1-9][0-9]*) 

demo: http://regex101.com/r/bz8fe5


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -