I'm using match() in JavaScript to parse a dates from an RSS feed, I just can't get my head around the correct regular expression to find the date format.
Here's the date:
2009-05-11 16:59:20
And the regular expression so far:
if (dateToParse.match(/^\d\d\d\d-\d\d-\d\d/)) {
        dateTimeSeparator = " ";
        monthIndex = 0;
        dayIndex = 1;
        yearIndex = 2;
}