@Test public void testRemoveNonNumeric() throws Exception { Assert.assertEquals(removeNonNumeric("3515 1222 8436 4200 0195 6500 1000 0018 1214 0002 0216"), "35151222843642000195650010000018121400020216"); Assert.assertEquals(removeNonNumeric("22.843.642/0001-95"),"22843642000195"); }
public static String removeNonNumeric(String text) { return text.replaceAll("[^0-9]", ""); }
StringUtils { public static String removeNonNumeric(String text) { return text.replaceAll("[^0-9]", ""); } }
StringUtils { public static String removeNonNumeric(String text) { return text.replaceAll("[^0-9]", ""); }  }
StringUtils { public static String removeNonNumeric(String text) { return text.replaceAll("[^0-9]", ""); }  static boolean isNumeric(String maybeNumeric); static boolean validateCNPJ(String CNPJ); static String reverseString(String str); static void appendVarArgs(StringBuilder sb, String... strings); static boolean validateElectronicTaxReceiptAccessKey(String accessKey); static String removeNonNumeric(String text); }
StringUtils { public static String removeNonNumeric(String text) { return text.replaceAll("[^0-9]", ""); }  static boolean isNumeric(String maybeNumeric); static boolean validateCNPJ(String CNPJ); static String reverseString(String str); static void appendVarArgs(StringBuilder sb, String... strings); static boolean validateElectronicTaxReceiptAccessKey(String accessKey); static String removeNonNumeric(String text);  }