Hi,
I wand to replace URLs like www.example.com/profile/USERNAME by [user]USERNAME[/user] BBCode!
$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