title: php get css with regexp
body: <p>I'm trying to get css selector + styles with a regexp but there is always a problem...</p>
  
  <p>So do you have an idea (exemple ?) of a regexp do get this:</p>
  
  <pre><code>array(
  [0] =&gt; "div {
      background: red;
      color: blue;
  }",
  [1] =&gt; "section {
      /* comment with bad idea } &lt;- this break regexp [^}]+ */
      background: blue;
      color: red;
  }"
  );
  </code></pre>
  
  <p>fom this css:</p>
  
  <pre><code>div {
      background: red;
      color: blue;
  }
  
  section {
      /* comment with bad idea } &lt;- this break regexp [^}]+ */
      background: blue;
      color: red;
  }
  </code></pre>
  
  <p>Thx</p>