M
M
Maria2018-04-23 18:33:21
Regular Expressions
Maria, 2018-04-23 18:33:21

How to create a regular expression for the range of values ​​1-100,1-100?

It is necessary to limit the range of possible: allow to enter only two numbers separated by a comma (without spaces) - each number can be from 1 to 100. For
example: 1.100 or 2.25
to remake it so as to prohibit input more than 100?
[1-9]\d{0,2},[1-9]\d{0,2}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-04-23
@missbells

^(([1-9]\d?)|(100)),(([1-9]\d?)|(100))$

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question