I’ve NEVER been good with regular expressions despite my efforts.
Can someone please help me out I’m trying to match urls in this format:
"/year/monthnum/day/postname/"
so:
"2012/05/03/whatever-the-text-here"
using:
if(window.location.pathname.match(...))
{
//do something
}
I’ve tried a couple of things but I’m just terrible with regex… Can someone help me out here?
http://regexr.com?30ram
this can be enhanced also to check that day is not 0… or things like that…
but i think its enough.