Skip to content

Comment on \d less efficient than [0-9]

Comments

The test code creates a new regex every time, would be interesting to see how it works with a compiled and reused regex.

It compiles it once and then matches it against 10000 strings.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.