私はRegexpal.comを使用していますが、このSOの質問を見ました
文字列を一致させないようにしています。
画像へのすべてのリンクを文字列で preg_replace する必要があります
<<IMAGE:{link}>>
。(https?:\/\/)?\S*(jpg|png|jpeg|bmp|gif)
OR
なので前と同じですが ingを使おうと思ってい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>>