I [kullanıcı] USERNAME [/ user] BBCode ile www.example.com / profil / username gibi URL'leri yerine değnek!
$userURLSearch = "#((https?|ftp)://|www\.)example\.com/profile/([A-Za-z][A-Za-z0-9_-]+)(?!/)#i";
$userURLReplace = "[user]\\3[/user]";
$text = preg_replace($userURLSearch, $userURLReplace, $text);
But it also transforms URLs like www.example.com/profile/USERNAME/more/and/more into [user]USERNAME[/user]/more/and/more ... :( It should only transform exactly "/profile/USERNAME".
can somebody help me? thx