编辑代码

test = '(?<day\d{2})-(?<month>\d{2})-(?<year>\d{4})'

console.log(test)