How can I remove comments from CSS using Regex.Replace()?
Note - I'm not able to use the regex mentioned here in C# - Regular expression to remove CSS comments.
How can I remove comments from CSS using Regex.Replace()?
Note - I'm not able to use the regex mentioned here in C# - Regular expression to remove CSS comments.
I wonder if the following version of Maxim's solution would be faster.
"/\*[^*]*.*?\*/"
As the discussion shows this will also eliminate comments within string literals.
* character." before /* not a comment */ after". It's probably getting too complicated to handle all possible cases with regexps alone.