title: Split html element and get text
body: <p>I have two sample code below the <code>sample 2</code> seems working for me to split the element. But the problem is my element has a style to color the text inside it, as you can see in the <code>sample 1</code>.</p>
  <p><strong>Desired Output for sample 1</strong></p>
  <blockquote>
  <p>A2 Award Notice</p>
  <p>or</p>
  <p>A2 Lease Contract</p>
  </blockquote>
  <p><strong>Sample 1</strong></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var str = '&lt;div class="col-md-10"&gt; &lt;a style="color:green"&gt;A2 Award Notice   &lt;/a&gt; &lt;a style="color:black"&gt;or&lt;/a&gt; &lt;a style="color:orange"&gt;A2 Lease Contract  &lt;/a&gt; &lt;/div&gt;';
  
  console.log(str.match(/&lt;a&gt;.*?&lt;\/a&gt;/g));</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  <p><strong>Sample 2</strong></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var str = '&lt;div&gt;&lt;a&gt;A&lt;/a&gt;&lt;a&gt;B&lt;/a&gt;&lt;p&gt;Foobar&lt;/p&gt;&lt;a&gt;C&lt;/a&gt;&lt;/div&gt;';
  console.log(str.match(/&lt;a&gt;.*?&lt;\/a&gt;/g));</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>TIA.</p>