I want to remove all links which matched this domain vnexpress.net in href attribute.
This is a link example:
<a href="http://vnexpress.net/whatever">whatever</a>
This is my code:
$contents = preg_replace('/<a\s*href=\"*vnexpress*\"\s(.*)>(.*)<\/a>/', '', $data->content);
Please help me! Thank you so much!.
href="\K[^"]*\bvnexpress\.net[^"]*'~<a\s*href="[^"]*?\bvnexpress.net\b[^"]*"\s*>([^<>]*)<\/a>~'