I return the following string from a webpage
Order Number: 1509596 Customer Number: 8
but it coul
I can't think of a single line that would accomplish this, but the following should work:
String orderString = "Order Number: 1509596 Customer Number: 8";
Pattern p = Pattern.compile("[0-9]+");
Matcher m = p.matcher(orderString);
if (m.find())
{
String orderNr = m.group();
System.out.println(orderNr);
}