我正在使用Regexpal.com,我看到了这个SO Question
我试图不匹配字符串。
我需要用字符串 preg_replace 所有出现的图像链接
<<IMAGE:{link}>>
。所以我想用(https?:\/\/)?\S*(jpg|png|jpeg|bmp|gif)
OR
同样的东西,但without
前面的(https?://)
以便:
Hi there this is an image link https://facebook.com/images/2323.jpg
and this one is too mysite.org/1.png
会变成这样:
Hi there this is an image link
<<IMAGE:https://facebook.com/images/2323.jpg>> and this one is too
<<IMAGE:mysite.org/1.png>>