RegEx: How can I match all numbers greater than 49?

前端 未结 6 789
孤独总比滥情好
孤独总比滥情好 2020-11-29 21:11

I\'m somewhat new to regular expressions and am writing validation for a quantity field where regular expressions need to be used.

How can I match a

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-29 21:40

    I know this is old, but none of these expressions worked for me (maybe it's because I'm on PHP). The following expression worked fine to validate that a number is higher than 49:

    /([5-9][0-9])|([1-9]\d{3}\d*)/
    

提交回复
热议问题