I am using Regexpal.com and I saw this SO Question
I am trying to NOT match a string.
I need to preg_replace all occurences of links to images with the string
<<IMAGE:{link}>>
.
So I was thinking to use (https?:\/\/)?\S*(jpg|png|jpeg|bmp|gif)
OR
ing with the same thing but without
the preceding (https?://)
so that:
Hi there this is an image link https://facebook.com/images/2323.jpg
and this one is too mysite.org/1.png
would become that:
Hi there this is an image link
<<IMAGE:https://facebook.com/images/2323.jpg>> and this one is too
<<IMAGE:mysite.org/1.png>>