import java.util.regex.Matcher;
import java.util.regex.Pattern;
...
Pattern pattern = Pattern.compile("[0-9]+");
Matcher matcher = pattern.matcher("test1string1337thingie");
// Find all matches
while (matcher.find()) {
// Get the matching string
String match = matcher.group();
}
Is one regexp solution.