Hello,
I need to create a regular expression so that I can replace anything in an html source file with blank if it does not match the criteria <a *> *</a>
Example,
<html>
<strong><a href="asdf.com"> test1 </a></strong>
<strong><a href="asdf.com"> test2 </a></strong>
</html>
would return:
<a href="asdf.com"> test1 </a>
<a href="asdf.com"> test2 </a>
I think a regular expression would be the easiest way to do this (preg_replace)
Thanks in advance for your help.
I need to create a regular expression so that I can replace anything in an html source file with blank if it does not match the criteria <a *> *</a>
Example,
<html>
<strong><a href="asdf.com"> test1 </a></strong>
<strong><a href="asdf.com"> test2 </a></strong>
</html>
would return:
<a href="asdf.com"> test1 </a>
<a href="asdf.com"> test2 </a>
I think a regular expression would be the easiest way to do this (preg_replace)
Thanks in advance for your help.