x', '\1', $contents); break; case 1: // breaks on my windows xp localhost, but works on my webspace $contents = preg_replace('< /\*([^*\\\\]|\*(?!/))+\*/ >x', '\1', $contents); break; case 2: // works ok on my windows xp localhost $contents = preg_replace('< \s*([@{}:;,]|\)\s|\s\()\s* | # Remove whitespace around separators, but keep space around parentheses. # /\*([^*\\\\]|\*(?!/))+\*/ | # Remove comments that are not CSS hacks. [\n\r] # Remove line breaks. >x', '\1', $contents); break; } echo $contents; echo "
done.";