You could use
preg_replace('/[.,]/', '', $string);
but using a regular expression for simple character substitution is overkill.
You'd be better off using strtr:
strtr($string, array('.' => '', ',' => ''));
or str_replace:
str_replace(array('.', ','), '' , $string);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…