3 ms·
No need to escape the dashes btw: $ node > '02-14-1924'.match(/\d{2}-\d{2}-\d{4}/) [ '02-14-1924', index: 0, input: '02-14-1924', groups: undefined
by kbd 8y ago
No need to escape the dashes btw:
$ node
> '02-14-1924'.match(/\d{2}-\d{2}-\d{4}/)
[ '02-14-1924', index: 0, input: '02-14-1924', groups: undefined ]