Tx Connorhd !!!
my final code to insert in post.php after
$mail_message_full = str_replace('<replier>', $username, $mail_message_full);
remove the space betwenn [ ]
// clean off the message of all BBcode
$a = array('[ b ]', '[ i ]', '[ u ]', '[ /b ]', '[ /i ]', '[ /u ]', '[ url ]', '[ /url ]', '[ email ]', '[ /email ]', '[ img ]', '[ /img ]');
$message = str_replace($a, '', $message);
$a = array('[ quote ]', '[ code ]');
$b = array("\n\n------------------------\n\tQuote :\n\n", "\n\n------------------------\n\tCode :\n\n");
$message = str_replace($a, $b, $message);
$a = array('[ /quote ]', '[ /code ]');
$message = str_replace($a, "\n\n------------------------\n\n", $message);
$a = array( '#\[url=("|\'|)(.*?)\\1\]\s*#i', '#\[email=("|\'|)(.*?)\\1\]\s*#i', '#\[colou?r=("|\'|)(.*?)\\1\](.*?)\[/colou?r\]#is','#\[quote=("|\'|)(.*?)\\1\]\s*#i');
$b = array( "$2", "$2", "$3", "\n\n------------------------\n\t$2 write :\n\n");
$message = preg_replace($a, $b, $message);