Hi have the following content within an html page that stretches multiple lines
It is possible to use regex to strip out chunks of html data, but you need to wrap the html with custom html tags which get ignored by browsers. For example:
This will be shownTo strip the tags with the rel="nofollow" attributes, you can use the following regex:
$newhtml = preg_replace('/<([^\s]+)[^>]*rel="nofollow"[^>]*>.*?<\/\1>/si', '', $html);
From experience, start the custom tags on a new line. Undoubtedly a hack, but might help someone.