Was painful! But I got it nonetheless, for anyone whose interested:
/**
* Matches dates with period, hyphen, or slash as the seperater
* however they have to be the same.
* I.E. 10.5-1975 won't return true, however 10.5.1975 OR 10-5-1975 will
**/
function isDate($date)
{
return (preg_match("~^\\d{1,2}([/.-])\\d{2}\\\\1\\d{4}$~", $date)==1) ? TRUE : FALSE;
}
Not extremely useful, just more of a backreferencing test for me? :-p