Replace !, ?, ..., and | with "." in order to avoid NullPointerException