Remove accents - [\\ p {InCombiningDiacriticalMarks}] vs [^ \\ p {ASCII}]

3

I created a code in Java to remove the accents like the following:

private String removerAcentos(String texto) {
  texto = Normalizer.normalize(texto, Normalizer.Form.NFD);
  texto = texto.replaceAll("[\p{InCombiningDiacriticalMarks}]", "");

  return texto;
}

I would like to know the difference between [\p{InCombiningDiacriticalMarks}] and [^\p{ASCII}] .

    
asked by anonymous 15.11.2016 / 13:48

1 answer

3

[\p{InCombiningDiacriticalMarks}] = Unicode characters only% [^\p{ASCII}] = Non-Latinos

    
15.11.2016 / 14:15