In Typescript, I'm trying to parse a string provided, in the form "DD/MM/YYYY"; the string can have one or two digits for day and month; for example:
8/10/2019 or 08/10/2019; 10/8/2019 or 10/08/2019.
I'have tried the following code, but ddDate is always null.
const regExp = new RegExp("^d{1,2}/d{1,2}/d{4}$");
const ddDate = dd.match(regExp)!;