title: Regular expression to get particular class name from a tag in php
body: <p><img src="https://i.stack.imgur.com/CHlhn.jpg" alt="enter image description here">I want to get a tag from the string/content matching class name "coremetrics" using regular expression</p>
  
  <p>In Content href will be avilable like this <code>&lt;a href="/children" class="hp2s_desc_btn hp_sp13_btn_2 coremetrics"&gt;</code></p>
  
  <p>I need to get the a tag (red boxed) in an array using indetifier class name "coremetrics" (black box)</p>
  
  <p><img src="https://i.stack.imgur.com/XIv9R.jpg" alt="Example"></p>