How can I extract only the numeric values from the input string?
For example, the input string may be like this:
String str=\"abc d 1234567890pqr 548
You could do something like:
Matcher m = Pattern.compile("\\d+").matcher(str); while (m.find()) { System.out.println(m.group(0)); }