fork download
  1. <?php
  2.  
  3. $s = "asdfas fas fasfasf <div>this <strong>test</strong> is the variable</div> afasfasfa";
  4. echo preg_replace("/<div>(.*?)<\/div>/", "$1", $s);
  5. ?>
Success #stdin #stdout 0.03s 26168KB
stdin
Standard input is empty
stdout
asdfas fas fasfasf this <strong>test</strong> is the variable afasfasfa