How to use regular expression in Android

前端 未结 5 831
天命终不由人
天命终不由人 2020-12-03 21:07

I have a numberDecimal EditText which I want to validate using a regular expression. In validation what I want is:

  1. Before the decimal point, th

5条回答
  •  执笔经年
    2020-12-03 21:38

    You could just parse the number and check that it is < 1000 and that 10*number is an integer while num is not. It would probably be more readable too.

提交回复
热议问题