need to have the following result
$content = 'class="idz" href="http://www.domain1.com"';
Code: Select all
$content = 'asdasd <a class="idz" href="http://www.domain1.com">View this</a> hhh ';
$pattern = '/#<a(.*)>View this</a>#ims/';
$content = preg_replace($pattern, '$1', $content);
var_dump(content);