Last active
September 27, 2015 02:58
-
-
Save skoskie/1201241 to your computer and use it in GitHub Desktop.
CSS Minimizing Regex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(\/\*(.|\s)*?\*\/|(\n|\t|\r|\v|\f|\a){1,}|\s(?=\s)|(?<=})\s|(?<={)\s|\s(?={)|\s(?=})|(?<=;)\s|[[:blank:]](?=;)|(?<=:)[[:blank:]]|(?<=,)[[:blank:]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could use this with something like preg_replace() to dynamically minimize css.