How to create regEx from getting result is number in range from 0.01 to 1 000 000 Thanks
Asked
Active
Viewed 110 times
-4
-
1Why does it have to be a regular expression? – Felix Kling Jul 13 '20 at 23:14
1 Answers
0
The answer is that you wouldn't want a regular expression for that.
Instead you can simply test your number like n >= 0.01 && n <= 100000
.

Webber
- 4,672
- 4
- 29
- 38
-
1Not necessarily true. There are contexts where you can provide a regex for filtering, but not arbitrary code. – Steve Bennett Jul 13 '20 at 23:27
-
I have seen such contexts indeed, but not in javascript. Do you have an example? – Webber Jul 14 '20 at 08:16