I-href=" before an http:// if this http:// strong> takip href=" or src=" strong etmez eklemek gerekir >
Aşağıdaki kod kısmen çalışır. Kısmen uygun gördüğü anlamına gelir <a href=" only but not src=" strong>
$str= preg_replace(
"/(?<!a href=\")((http|ftp)+(s)?:\/\/[^<>\s]+)/i",
"<a href=\"\\0\"> target=\"blank\">\\0</a>",
$str
);
Size cevap için şimdiden teşekkür ederim çocuklar.