Regex to get the third Date in MM/DD/YYYY and M/D/YYYY Format

I have a series of PDF Files that I read text to. All of this files contains four dates in which, the third one is the one that I need.
I have this regex before to get the the third date in MM/DD/YYYY

(\d{2}(\/|-)\d{2}(\/|-)\d{2,4})

Although this works, most of the time. The dates that are single digit ones doesn’t add a zero before it, so dates like 11/4/2021, 9/11/2021, and 3/8/2021 doesn’t match.
I hope you can help me with this.

Hi,

Can you try the following expression?

System.Text.RegularExpressions.Regex.Match(yourString,"[01]?[0-9][-/][0-3]?[0-9][-/]\d{4}").Value

Regards,

Is there any key word before the third date? You may use it to substring and get a small portion of string then match using regex.

If you have sample text I may help you

Hi,
Can you please tell how exactly the format of the text is present.
like is there any separation using delimiter between the dates?

There’s a “Current Date” before but sometimes the pdf files messes up so OCR readings are not in the same line. What I did is to get all the dates, save it to matches then do like “Current Date= DateMatches(2).toString” it’s working on mine up until now.