Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Pastebin / img bbcode with alt

Name=img
Mode=pcre
Pattern=\[img alt=([^\:"\'\]]+)\]((?:http://|https://|ftp://)?[^"\';:\?\[]+\.(?:jpg|jpeg|gif|png))\[/img\]
Replacement=<img src="$2" alt="$1" />

Name=img
Mode=pcre
Pattern=\[img=((?:http://|https://|ftp://)?[^\]"\';:\?]+\.(?:jpg|jpeg|gif|png)) alt=([^\:"\'\]]+)\]((?:http://|https://|ftp://)?[^\]"\';:\?]+\.(?:jpg|jpeg|gif|png))\[/img\]
Replacement=<a href="$1"><img src="$3" alt="$2" /></a>

Теги:

Bbcode  Alt  Img