title: Javascript Regex - Replace { with nothing
body: <p><br />
  i have a little problem and i have no idea what is wrong</p>
  
  <pre><code>    var selector_css;
      var sheet= document.styleSheets[0];
      var rules= 'cssRules' in sheet? sheet.cssRules : sheet.rules;
      for (var i= 0; i&lt;rules.length; i++)
      {
          var rule= rules[i];
          var text= 'cssText' in rule? rule.cssText : rule.selectorText+' {'+rule.style.cssText+'}';
          text =  text.replace(/\s/g, '');
          selector_css = text.match(/^(.*?){/gi);
           // selector_css = selector_css.replace(/{/g,'');  // &lt;- dont work ?
          $('body').append('- '+selector_css+' &lt;br /&gt;');
      }
  </code></pre>
  
  <p>Everything works fine but when i add </p>
  
  <pre><code>selector_css = selector_css.replace(/{/g,''); 
  </code></pre>
  
  <p>I dont get a result or an error, but why?
  Can somebody help me?</p>
  
  <p><a href="http://jsfiddle.net/beMKY/" rel="nofollow">http://jsfiddle.net/beMKY/</a></p>
  
  <p>Thanks in advance!<br />
  Peter</p>