Hi, Assuming I've been given the following string to match against:
#sidebar h1 ul li{ #a:hover; height : 100px ;color: #fffff ; font-family: @fonts; }
What I want is to only match whitespaces within the curly braces { } that are not enclosed on both sides by words.
My current regex looks like this:
( (?!\w)|(?<!\w) )
But it matches characters outside the braces too. I tried look-around, but it's not really working out the way I imagined it and I just suck at regex..
I want to strip all whitespaces from css classes content so the string would be condensed to:
#sidebar h1 ul li{#a:hover;height:100px;color:#fffff;font-family:@fonts;}
Btw, I'm using the .NET Regex engine, so if anyone needs a quick testing environment for that, I found this Silverlight one pretty handy: http://www.regexlib.com/RESilverlight.aspx