Thanx jazz, with your help, I added 2 patterns, but could not get the IP address by itself
$string="Wed Jul 04 08:23:55 EDT 2012, johndoe(192.168.0.190) to all: testeeeeeeeeeeeeeeeeettttttttttttttttttttt";
$patterns = array();
$patterns[0] = '/\,/';
$patterns[1] = '/(\(.*\))/';
$patterns[2] = '/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/';
$patterns[3] = '/(?<=all)\:/';
$replacements = array();
$replacements[0] = '!~';
$replacements[1] = '!~';
$replacements[2] = '!~';
$replacements[3] = '!~';
echo preg_replace($patterns, $replacements, $string);