code: static public String removeAllCharsExceptDigits(String str0) {
          if (str0 == null) {
              return null;
          }
          if (str0.length() == 0) {
              return str0;
          }
          StringBuilder buf = new StringBuilder(str0.length());
          int length = str0.length();
          for (int i = 0; i < length; i++) {
              char c = str0.charAt(i);
              if (Character.isDigit(c)) {
                  // append this character to our string
                  buf.append(c);
              }
          }
          return buf.toString();
      }
docs: Removes all other characters from a string except digits.  A good way
  of cleaing up something like a phone number.
  @param str0 The string to clean up
  @return A new String that has all characters except digits removed