I would like to use preg_match in PHP to test the format of a URL. The URL looks like this:
/2013/09/05/item-01.html
I'm trying to get this to work :
if (preg_match("/([0-9]{4})\/([0-9]{2})\/([0-9]{2})/[.]+[.html]$", $_SERVER['REQUEST_URI'])) :
echo "match";
endif;
But something's not quite right. Any ideas?