Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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", "");
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #replace #number
ADD COMMENT
Topic
Name
2+4 =