Below is a simple php code to sanitise an input message . The function has 3 parameters, depending on the parameter the input is parsed to filter.

200477351-001
<br></br>
function sanitize_message( $message , $email = true, $numbers = true, $url = true )<br></br>
{

$message = strip_tags( $message );

if($email)
{
//strip email address
$emailregexp = "[A-Za-z0-9-]+(.[A-Za-z0-9-]+)*@[A-Za-z0-9-]+(.[A-Za-z0-9-]+)*(.[A-Za-z]{2,3})";
$message = ereg
replace($email_regexp, 'XXX', $message);
}

if($numbers)
{
//strip all numerical values
$numberregexp = "[0-9]";
$message = ereg
replace($number_regexp, 'XXX', $message);
}

//eliminate url from message
if($url)
{

$urlregexp = "(https?://)?(www.)?([a-zA-z0-9.])*[a-zA-Z0-9]*.[a-z]{2,3}";
$message = ereg
replace($url_regexp, 'XXX', $message);
}

//eliminate all the bad words
$badwords = array("fk", "son of a b*h");
$message = str
ireplace($bad_words, 'XXX', $message);

return $message;

}