title: Regex in python to get javadoc-style comments in CSS
body: <p>I'm writing a python script to loop through a directory of CSS files and save the contents of any which contain a specifically-formatted javadoc style comment.</p>
  
  <p>The comment/CSS looks like this:</p>
  
  <pre><code>/**thirdpartycss
  
  * @description Used for fixing stuff
  
  */
  .class_one {
      margin: 10px;
  }
  #id_two {
      padding: 2px;
  }
  </code></pre>
  
  <p>The regex to fetch the entire contents of the file looks like this:</p>
  
  <pre><code>pattern = "/\*\*thirdpartycss(.*?)}$"
  matches = re.findall(pattern, css, flags=re.MULTILINE | re.DOTALL)
  </code></pre>
  
  <p>This gives me the file contents. What I want to do now is write a regex to grab each CSS definition within the class. This is what I tried:</p>
  
  <pre><code>rule_pattern = "(.*){(.*)}?"
  rules = re.findall(rule_pattern, matches[0], flags=re.MULTILINE | re.DOTALL)
  </code></pre>
  
  <p>I'm basically trying to find any text, then an opening {, any text, then a closing } - I want a list of all of the CSS classes, essentially, but this just returns the entire string in one chunk.</p>
  
  <p>Can anybody point me in the right direction?</p>
  
  <p>Thanks.
  Matt</p>