Regex to remove the css empty class
Hi All,
I have html style sheet in xml format., how can i remove the empty classes?
eg:
#span23
{
}
or
#span23{
}
I created 2 different pattern
Regex.Matches(strModifiedCSS.ToString(), @"[\#]+([a-z]+[0-9]+)", RegexOptions.IgnoreCase)
Regex.Matches(strModifiedCSS.ToString(), @"[\n]+\{(\s+)\}", RegexOptions.IgnoreCase)
but when i combined both it did not worked for me