I am trying to build a function that will parse some text containing some custom tags into proper html tags.
the tags are [b|u|i][/(b|u|i)], [link=url][/link],
.
function safeHTML($pText)
{
$text = htmlspecialchars($pText);
//replaces custom tags with standard ones
//$text = ereg_replace("[([b|i|u])]+" . "(????)" . "[\/([b|i|u])]", "<\1>\2</\1>", $text);
//quote
$text = ereg_replace("\[quote\]" . "(????)" . "\[\/quote\]", "<blockquote>\"<i><font color=#666666>\\1</font></i>\"</blockquote>", $text);
//anchor tags: <a>*.*</a>
$text = ereg_replace("\[link=+ *([^>]+)*\]" . "(???)" . "\[\/link\]", "<a href=\"\\1\" target=\"_blank\">\\2</a>", $text);
//returns output
return $text;
}
what do I need to put where in place the '????'?