BigBadDave
Programmer
I have been making my own mark-up a bit like TGML :
function parseBDML($string) {
$search = array ("/\[sup\]/",
"/\[\/sup\]/",
"/\[sub\]/",
"/\[\/sub\]/",
"/\[s\]/",
"/\[\/s\]/"
;
$replace = array ("<sup>",
"</sup>",
"<sub>",
"</sub>",
"<s>",
"</s>"
;
return stripslashes(preg_replace ($search, $replace, $string));
}
But I want to have a \[code\] | \[ignore\] tag (just like TGML) how do I make the regex ignore stuff between these tags ?? Regards
Big Bad Dave
davidbyng@hotmail.com
function parseBDML($string) {
$search = array ("/\[sup\]/",
"/\[\/sup\]/",
"/\[sub\]/",
"/\[\/sub\]/",
"/\[s\]/",
"/\[\/s\]/"
$replace = array ("<sup>",
"</sup>",
"<sub>",
"</sub>",
"<s>",
"</s>"
return stripslashes(preg_replace ($search, $replace, $string));
}
But I want to have a \[code\] | \[ignore\] tag (just like TGML) how do I make the regex ignore stuff between these tags ?? Regards
Big Bad Dave

davidbyng@hotmail.com