// 2,90€( pro 100g)?
if(pricestr == null)
return 0;
- Pattern r = Pattern.compile("^([0-9,]+)€( pro [0-9]+[a-z]+)$");
+ Pattern r = Pattern.compile("^([0-9,]+)€( pro [0-9]+[a-z]+)?$");
Matcher m = r.matcher(pricestr);
if (m.find()) {
NumberFormat nf = NumberFormat.getInstance(Locale.GERMAN);
try {
- Number result = nf.parse(m.group(1));
+ Number result = nf.parse(m.group(1));
return (int)(result.doubleValue()*100);
} catch (ParseException e) {
return 0;