said by Drunkula:I'm no regex master but just a suggestion... Wouldn't it be better to replace the [0-9][0-9]
with [\d]{2}
instead?
Better in what sense? Unless this is destined for a long life where it will be examined and modified by others, I think the rule of 'whatever works' applies here.
Besides (1),
[0-9][0-9]
is probably valid in practically any regular-expression parser anywhere, and
[\d]{2}
is much less universal.
Besides (2),
[0-9][0-9]
is certainly more obvious to the reader (which is why our writer came up with this form).
Don't sweat the small stuff.