[01]?\d{1,2} can someone please explain the complete meaning of the above line.
Asked
Active
Viewed 36 times
-3
-
1You can try out any online regex explaining site like [regexr](https://regexr.com/) – Smile Nov 13 '20 at 06:26
2 Answers
0
This pattern describes a text that might (but not must) start with a 0 or 1 ([01]?
) followed by one to two digits (\d{1,2}
).

Milgo
- 2,617
- 4
- 22
- 37
0
In short, this pattern used to test a number between 000 and 199. [01]? means a number starts with 0 or 1, and \d{1,2} means a one-digit or two-digit number.

Oliver.bi
- 21
- 1