>>733
たとえば

$text = "taro@example.com";
echo preg_replace('/([a-z0-9\.\-\_]+)@/ie', "str_repeat('*',strlen('$1')) . '@'", $text);