title: javascript regular expressions removing extra p tags
body: <p>When I copy from Microsoft Word and paste it from a clipboard into contenteditable div tag extra markup code gets pasted.
  Here is a link to test:
  <a href="https://codepen.io/anon/pen/hFAdk" rel="nofollow noreferrer">https://codepen.io/anon/pen/hFAdk</a></p>
  <p>The script doesn't remove the extra paragraphs tags. This is the regular expression that I am trying to add but it's not working.</p>
  <pre><code>&lt;p[^&gt;]*&gt;[\s|&amp;nbsp;]*&lt;\/p&gt;
  </code></pre>
  <p><strong>Input</strong>:</p>
  <p>Mauris adipiscing lacus</p>
  <p>Phasellus iaculis iaculis</p>
  <p>Pellentesque felis quam</p>
  <p><strong>Output</strong>:</p>
  <p></p>
      <p>Mauris adipiscing lacus</p>
      <p></p>
      <p>Phasellus iaculis iaculis </p>
      <p></p>
      <p>Pellentesque felis quam </p>
   
  **Desired output**:
  <p></p>
      <p>Mauris adipiscing lacus</p>
      <p>Phasellus iaculis iaculis </p>
      <p>Pellentesque felis quam </p>
  <p>Does anyone have any idea how to remove those extra p tags? :(</p>
  <p>Thank you for your help in advance.</p>