Regex 'Date Finder' expression validation


I’m posting to validate a regular expression I have generated using this regex builder. I’m trying to search a string to see if it contains a date in the UK format dd/MM/yyyy.

The expression I generated is: [0-3][0-9](?:\/)[0-1][0-9](?:\/)[0-2][0-9][0-9][0-9]

It seems to work so far but I’m sure this can be improved on as I have limited experience with regular expressions. Any input would be appreciated, thank you.

Hi @PeterHeyburn

Try this


Ashwin S

1 Like


Try with this one,

1 Like


FYI, If you want to check strictly whether date string is valid, perhaps you should use IsDate function. For example, it can return exact if result 2/29 is valid or not, checking leap year.


1 Like

Thanks, this was useful!

Thanks, I’m not just looking for dates in 2019 or 2020 though but I can use the first parts of your expression!

1 Like

Thanks, I will be reading a field where a date should be entered (but accepts any freetext) so I want to make sure there is a valid date in a proper format as I need to use it later in the process.

I will be able to use IsDate in future though!