variable date format

Statements from one of my accounts use two different formats for the statement date. If the statement period spans two months the period will be given like this:
That is easy to parse, just grab the second occurance of a date. However, if the period is completely within a month it will be given like this:
Now it's the first date on the page rather than the second and also Hazel seems to have trouble with the date range (1-31).
I don't actually need the day of the statement, just the month and year. Is there any way to handle this situation?
June 30, 2018 to
July 31, 2018
That is easy to parse, just grab the second occurance of a date. However, if the period is completely within a month it will be given like this:
July 1-31, 2018
Now it's the first date on the page rather than the second and also Hazel seems to have trouble with the date range (1-31).
I don't actually need the day of the statement, just the month and year. Is there any way to handle this situation?