Answers for "java how to replace all none integers in a string"

0

java replace all not number

public static String removeNonDigits(final String str) {
   if (str == null || str.length() == 0) {
       return "";
   }
   return str.replaceAll("/[^0-9]/g", "");
}
Posted by: Guest on March-19-2021

Code answers related to "java how to replace all none integers in a string"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language