EvertVd - 4:15 pm on Feb 10, 2012 (gmt 0)
I am creating a workflow for myself which includes an automagical way of invalidating caches on my css and js files.
I stink however at regular expressions.
The file being called has the format:
So it can be either a css or a js file and it can be minified or not.
I need a regex that rewrites this to:
But it should exclude things like jquery-1.7.min.js etc.
What I have so far is:
RewriteRule ^(.+)\.(rev\.+)\.(js|css)$ $1.$3 [L]
I get stuck on the optional .min
I should perhaps mention that <number> is a hexadecimal number