fork download
  1. class Ideone {
  2. public static void main(String[] args) {
  3. String number = "043241.124.22";
  4. String n = number.replaceAll("(?<=^|\\D)[01](?=\\d)", "");
  5. System.out.println(n);
  6. }
  7. }
Success #stdin #stdout 0.06s 27956KB
stdin
Standard input is empty
stdout
43241.24.22