Cita:
Aquí quiero eliminar la etiqueta del dominio: somelink.com<a href="google.com/1235"> content1
</a>
<a href="somelink.com/2455"> content12
</a>
<a href="google2.com/3"> content13
</a>
<a href="some.com/34858"> content14
</a>
<a href="somelink.com/3"> content14
</a>
<a href="somelink.com/31111"> content14
</a>
<a href="somelink.com/3111d1"> content16
</a> ........ ect ...
</a>
<a href="somelink.com/2455"> content12
</a>
<a href="google2.com/3"> content13
</a>
<a href="some.com/34858"> content14
</a>
<a href="somelink.com/3"> content14
</a>
<a href="somelink.com/31111"> content14
</a>
<a href="somelink.com/3111d1"> content16
</a> ........ ect ...
Esto es lo que tengo :
Cita:
para que resulte:$abcont = file_get_contents ("http://www.example.com");
preg_match_all ('{<a href=somelink.com/.*?> (. *?) </a>}', $abcont, $allLinksMatchs);
$abcont = str_replace ("<a href =", $allLinksMatchs, $abcont);
preg_match_all ('{<a href=somelink.com/.*?> (. *?) </a>}', $abcont, $allLinksMatchs);
$abcont = str_replace ("<a href =", $allLinksMatchs, $abcont);
Cita:
Les agradeceria su ayuda <a href="google.com/1235"> content1
</a>
content12
<a href="google2.com/3"> content13
</a>
<a href="some.com/34858"> content14
</a>
content14
content14
content16
....... ect ...
</a>
content12
<a href="google2.com/3"> content13
</a>
<a href="some.com/34858"> content14
</a>
content14
content14
content16
....... ect ...