https://regex101.com/codegen?language=javascript
const regex = /^(\d{2,4})(\-|\/)(\d{2,4})(\-|\/)(\d{2,4})$/gm;
const str = `2021-12-01`;
regex.test(str)
No comments:
Post a Comment