I often see [0-9]
used in .NET regular expression answers on Stack Overflow instead of \d
. I’ve asked why, and the answer tends to be “\d
matches more than just [0-9]
”. So what more does it match? This table says it matches decimal digits. And what about \p{Nd}
?
Or is there no difference, and this is just good practice because of some other regex engine?