I need a PHP script to loop through all .html files in a directory and in each one find the first instance of a long date (i.e. `August 25th, 2014`) and then adds a tag with that date in short format (i.e. `<p class="date">08/25/14</p>`).

Has anyone done something like this before? I'm guessing you'd explode the string and use a complex case statement to convert the month names and days to regular numbers and then implode using `/`.

But I'm having trouble figuring out the regular expression to use for finding the first long date.

Any help or advice would be greatly appreciated!