3 ms·
and [0-9] is more specific than \d "In most flavors that support Unicode, \d includes all digits from all scripts." [1] EDIT: But I guess for the majority of
by leeoniya 11y ago
and [0-9] is more specific than \d
"In most flavors that support Unicode, \d includes all digits from all scripts." [1]
EDIT: But I guess for the majority of use cases it doesn't matter [2] since PCRE is the norm almost everywhere.
[1] http://www.regular-expressions.info/shorthand.html http://www.regular-expressions.info/shorthand.html
[2] "Notable exceptions are Java, JavaScript, and PCRE. These Unicode flavors match only ASCII digits with \d"