change format of patterns