Looks like regex can be a little bit simplified, see assetic one's: https://github.com/kriswallsmith/assetic/blob/master/src/Assetic/Filter/BaseCssFilter.php#L87