Java tutorial
//package com.java2s; public class Main { public static String RemoveAllNonDigits(String string) { return string.replaceAll("[^\\d+]+", ""); } }