title: Regex to match valid values for html style attribute
body: <p>I'm stripping out all style attributes from some html. I could use the regex </p>
  
  <pre><code>/style=("[^"]"|'[^']')/
  </code></pre>
  
  <p>But I wonder if this is inefficient (due to the negative matching). I also know it's vulnerable to style attributes (e.g. background-image) that can contain quotes. </p>
  
  <p>Is there a regex I can use to match valid style strings or, like parsing html with regex, is this a task too difficult for a regex to perform in general?</p>
  
  <p>*edit Here is (I think) the trickiest style string in the html I'm scraping</p>
  
  <pre><code>style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'"
  </code></pre>