Updated preg_replace for keywords