I want to find all numbers from a given string (all numbers are mixed with letters but are separated by space).I try to split the input String but when check the result arra
You can try with Pattern and Matcher as well.
Pattern
Matcher
Pattern p = Pattern.compile("\\d+"); Matcher m = p.matcher("asd0085 sa223 9349x"); while (m.find()) { System.out.println(m.group()); }