title: replace semicolon (;) but not html characters (&nbsp; etc.)
body: <p>I'm looking for regexp for my issue.
  I have a text (specification of a product), for example:</p>
  
  <p><code>length: 20cm; height: 10cm; &amp;laquo;Night&amp;raquo; mode: yes;&amp;nbsp;manufacturer : Sony&amp;copy; manual&amp;nbsp;:&amp;nbsp;yes</code></p>
  
  <p>The final result should look like this</p>
  
  <pre><code>&lt;tr&gt;&lt;td&gt;length&lt;/td&gt;&lt;td&gt;20cm&lt;/td&gt;&lt;/tr&gt;
  ...
  &lt;tr&gt;&lt;td&gt;manufacturer&lt;/td&gt;&lt;td&gt;Sony&amp;copy;&lt;/td&gt;&lt;/tr&gt;
  </code></pre>
  
  <p>So I should replace <code>":" + whitespace characters(\s*)</code> for <code>"&lt;/td&gt;&lt;td&gt;"</code>  and <code>";" + whitespace characters(\s*)</code> for <code>"&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;"</code>, but not in the case where there are  latin symbols <code>[a-z]+</code> and <code>&amp;</code> sign before the <code>;</code>.
  The point is in html chars like &amp;_nbsp; &amp;_laquo; &amp;_copy etc. that contains ";"</p>
  
  <p>In other words <code>:\s*</code> but not <code>&amp;[a-z]+[;]</code>. </p>
  
  <p>How can I do this?</p>
  
  <p>My regexp in smarty looks like this:
  " |regex_replace:"/[:]\s*/":""|regex_replace:"/[;]\s*/":"" " so the only thing is to remove html chars... I tried some combinations with (?!...) but no success
  I'm looking for something like this
  <a href="https://stackoverflow.com/questions/3194867/regexp-for-matching-three-letters-but-not-text-buy">RegExp for matching three letters, but not text &quot;BUY&quot;</a></p>