<?php $s = "<div>this is the variable</div>"; echo preg_replace("/<div>(.*?)<\/div>/", "$1", $s);?>
Standard input is empty
this is the variable
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!