I'm trying to replace some image URI's in some phpBB forum post content retrieved from the DB for an external page.
preg_replace('/((https?|ftp).*\.(gif|png|jpg|jpeg))/i', '<img src="$1" alt "" />','http://somesite.com/image.png awordcontainingpng');
The above works well and as expected.
The thing is, when I try to apply the same to the MySQL result, nothing gets matched. Matches seem to work when I remove the escaped dot
E.g.:
preg_replace('/((https?|ftp).*(gif|png|jpg|jpeg))/i', '<img src="$1" />',$phpbb_post);
But that's no good. The data is BLOB type - I don't know if that makes a difference. Could anyone help me with this?
Thanks.