2 ms·
Exactly, it mostly about readability which is often (not always) better if the shortest possible pattern is used. [0|1|2|3|4|5|6|7|8|9][0|1|2|3|4|5|6|7|8|9]{0,
by noxer 7y ago
Exactly, it mostly about readability which is often (not always) better if the shortest possible pattern is used.
[0|1|2|3|4|5|6|7|8|9][0|1|2|3|4|5|6|7|8|9]{0,} and [0-9][0-9]* and [0-9]+ and \d+ all do the same so they are not wrong as in the result will be correct.