The range of valid dates is 06–30 for June and 01—07 for July. Because the ranges of days are dissimilar, we should use separate regexes for each month. These are
/2009 06 (09 | [12][0-9] | 30)/x
(Notice how the day ranges are divided into cases depending on the tens place, because there are different conditions on what is valid for the units place depending.)
And
/2009 07 0[1-7]/x
and then we can join them into
/(2009 06 (09 | [12][0-9] | 30)) | (2009 07 0[1-7])/x
and then factor out the common points (may not be the best for readabilty) and add the end-of-line assertion:
/2009 0 (6 (09 | [12][0-9] | 30)) | (7 0[1-7]) $/x