min.js files in a wordpress site and my caching plugin says "Enter the URL of JS files to reject (one per line). You can use regular expressions (regex)."
Is there a way too put in a url with regex and target all files that have .min.js in them so I can exclude them all at once?
The same is also for .min.css files.
thanks!
The regex you are looking for looks like this:
^.+\.min\.(js|css)$
The explanation from regex101.com. I'll just past it here, since I can't do a better job:
^
assert position at start of the string .+
matches any character (except newline)
+
Between one and
unlimited times, as many times as possible, giving back as needed
[greedy] \.
matches the character . literally min
matches the
characters min literally (case sensitive) \.
matches the character .
literally (js|css)
js
js matches
the characters js literally (case sensitive) css
css
matches the characters css literally (case sensitive) $
assert
position at end of the string