What is the difference between [01]?\d?\d? and [01]?\d\d? and [01]?\d?\d

I am learning Regular Expressions .
A problem bothers me.in ip address Regular Expressions . the last part , [01]?\d\d?.
used to identify the number range 0-199!
but why the middle “\d” don’t add “?” ?
I tested it in the regexr.com and the results are the same.

as I don’t have the whole regular expression, it is hard to discern if the last part is related in some way to the rest of the regular expression.

To break down the snippet you have provided:

[01] <--Signifies a character class selection of either 0 or 1
? <--Signifies that the previous token is optional
\d <-- Signifies a short hand character class for [0-9]

You have to understand that the question mark allows the regular expression match to become greedy by trying to choose the best option that fits the regular expression.