I am trying to match length width and height with a regular expression.
I have the following cases
Artikelgewicht3,7 Kg
Produktabmessungen60,4 x 46,5 x 42 cm
or
Artikelgewicht3,7 Kg
Produktabmessungen60 x 46 x 42
or
Artikelgewicht3,7 Kg
Produktabmessungen60 x 46
The second case can be matched with (\d+) x (\d+) x (\d+)
, which works fine.
I further tried to match the first and the third case with (\d+)(\\,\d+)? x (\d+)(\\,\d+)? x (\d+)(\\,\d+)?
.
Any suggestions what I am doing wrong?