javascript - Regex to allow number greater than 0.5 -


hi i'm working on regex , want add conditional allow numbers greater 0.5 here regex

^(?![.0]*$)[0-9]+(?:\.[1-9]{1,2})?$ 

i want values between 0 , 0.5 don't match this.

regular expressions awesome, can hard read , maintain. feels scenario should parse string , compare value.

var num = parsefloat(input); if (num > 0.5)     ... 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -