fork(4) download
  1. <?php
  2.  
  3. $str ='<h1 class="page-title" id="page-title-heading" aria-labelledby="page-title-heading toolbar-amount" > <span class="base" data-ui-id="page-title-wrapper" >Sarees</span> </h1>';
  4. $king = preg_match('/<h1[^>]*>(.*?)<\/h1>/s', $str, $matches);
  5. if ($king) {
  6. echo $matches[0];
  7. }else{
  8. echo "false";
  9. }
Success #stdin #stdout 0.01s 82944KB
stdin
Standard input is empty
stdout
<h1 class="page-title" id="page-title-heading" aria-labelledby="page-title-heading toolbar-amount" > <span class="base" data-ui-id="page-title-wrapper" >Sarees</span> </h1>