I'm not very good with regex so I'm hoping to get a bit of help with this one. Basically I need to remove images that are inserted from a specific domain in a string. The string could contain images from other domains, that need to remain, and text that needs to stay too.
I have tried using regex like so (fairly sure I'm still way off though):
$content = preg_replace("/http://www.theblacklisteddomain.com[^>]+\>/i", " ", $content);
I'm open to other solutions outside of regex that don't involve loading a library. It needs to happen on the server side, I know that with jQuery or vanilla JS this would be a lot easier.
Thanks!