i have a string containing the following: \"Did It Your Way, 11.95 The History of Scotland, 14.50, Learn Calculus in One Day, 29.95\" is there any way to get the doubles fro
String text = "Did It Your Way, 11.95 The History of Scotland, 14.50, Learn Calculus in One Day, 29.95";
List foundDoubles = Lists.newLinkedList();
String regularExpressionForDouble = "((\\d)+(\\.(\\d)+)?)";
Matcher matcher = Pattern.compile(regularExpressionForDouble).matcher(text);
while (matcher.find()) {
String doubleAsString = matcher.group();
Double foundDouble = Double.valueOf(doubleAsString);
foundDoubles.add(foundDouble);
}
System.out.println(foundDoubles);