хм...
http://igru6ek.ru/bbcode.html
function tags($text = '') {
$text = preg_replace('#\[b\](.*?)\[/b\]#si', '<span style="font-weight: bold;">\1</span>', $text);
$text = preg_replace('#\[i\](.*?)\[/i\]#si', '<span style="font-style:italic;">\1</span>', $text);
$text = preg_replace('#\[u\](.*?)\[/u\]#si', '<span style="text-decoration:underline;">\1</span>', $text);
$text = preg_replace('#\[s\](.*?)\[/s\]#si', '<span style="text-decoration: line-through;">\1</span>', $text);
$text = preg_replace('#\[red\](.*?)\[/red\]#si', '<span style="color:red">\1</span>', $text);
$text = preg_replace('#\[green\](.*?)\[/green\]#si', '<span style="color:green">\1</span>', $text);
$text = preg_replace('#\[blue\](.*?)\[/blue\]#si', '<span style="color:blue">\1</span>', $text);
$text = preg_replace_callback('~\\[url=(https?://.+?)\\](.+?)\\[/url\\]|(https?://(www.)?[0-9a-z\.-]+\.[0-9a-z]{2,6}[0-9a-zA-Z/\?\.\~&_=/%-:#]*)~', 'url_replace', $text);
return $text;
}
Changed: Абдула (27.05.2013 / 22:46)