I am trying to clean up some text - example
 
$x=preg_replace($rep, "abc", "<div class='his'><div
class='hers'><p>cheese</p>");

I want to end up with 
abc<p>cheese</p>

I had 
$rep="/<div(.*)'>/";
but that matches the LAST >, the one in </p>.  

I need it to match with "the first > after you have found <div"

Can anyone tell me what I am doing wrong, please?
Pete

Reply via email to