Skip to content

Instantly share code, notes, and snippets.

@Kindari
Created September 11, 2012 20:16
Show Gist options
  • Save Kindari/3701684 to your computer and use it in GitHub Desktop.
Save Kindari/3701684 to your computer and use it in GitHub Desktop.
$patterns = array(
'#(?P<category>[^\d\/]+)?\/?(?P<year>\d{4})?\/?(?P<month>\d{1,2})?\/?(?P<day>\d{1,2})?$#', // Listing
'#(?P<year>\d{4})\/(?P<month>\d{1,2})\/(?P<day>\d{1,2})\/(?P<slug>.*)#', // Entry
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment