4 ms·
In many environments, [0-9]{3}-?[0-9]{4} is even more specific (and faster) because \d would match other digit characters outside of [0-9].
by oftenwrong 11y ago
In many environments,
[0-9]{3}-?[0-9]{4}
is even more specific (and faster) because \d would match other digit characters outside of [0-9].
- dalore 11y agotaking it to the next level: [0-9][0-9][0-9]-?[0-9][0-9][0-9][0-9]