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.
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.