To Match: Tue, Jul 29, 2003

> $pregmatchstring="/([\s])*(Renewal\DDate|Registered\sthrough|Expires|Record
>\sExp ires|Domain\sExpires|Expiry\sDate)([\D\s]*)(.*)/i";

You can change the last part of $pregmatchstring in:

........Expiry\sDate)([\D\s]*|\w{3},\s\w{3}\s\d{2},\s\d{4})(.*)/i";
You can feed this match also to strtotime().

See:
<?php

$testdate='works: Tue, Jul 29, 2003 works';

$pregmatchstring="/(.*)(\w{3},\s\w{3}\s\d{2},\s\d{4})(.*)/i";

preg_match($pregmatchstring,$testdate,$matches);
echo strtotime($matches[2])-strtotime('29 July 2003');

?>

this will echos zero, zo i think it works.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to