in reply to Pattern Match/Trim Variables.

In defense of my pathetically ugly regexp, I offer two things:

  1. I was assuming, based on the original request, that some but not all dates needed fixing. Some of the other suggestions may not be concise enough to handle that.
  2. I sometimes (maybe too often) use that explicit \d\d type formatting to show what the pattern is. Anyway, \d{2} is 5 characters and \d\d is 4. 8-)
But I'd probably take the first one that's nicely commented over mine.