import re
regex = r"(?<!\S)\d+(?:,\d+)? ?x ?\d+(?:,\d+)?(?: ?x ?\d+(?:,\d+)?)*"
test_str = ("Square 10 x 3 x 5 mm\n"
"Round 23/22; 24,9 x 12,2 x 12,3\n"
"Square 10x2\n"
"Straight 10x2mm\n"
"Round 23/22; 24,9x12,2")
result = re.findall(regex, test_str)
print(result)
aW1wb3J0IHJlCgpyZWdleCA9IHIiKD88IVxTKVxkKyg/OixcZCspPyA/eCA/XGQrKD86LFxkKyk/KD86ID94ID9cZCsoPzosXGQrKT8pKiIKdGVzdF9zdHIgPSAoIlNxdWFyZSAxMCB4IDMgeCA1IG1tXG4iCgkiUm91bmQgMjMvMjI7IDI0LDkgeCAxMiwyIHggMTIsM1xuIgoJIlNxdWFyZSAxMHgyXG4iCgkiU3RyYWlnaHQgMTB4Mm1tXG4iCgkiUm91bmQgMjMvMjI7IDI0LDl4MTIsMiIpCnJlc3VsdCA9IHJlLmZpbmRhbGwocmVnZXgsIHRlc3Rfc3RyKQpwcmludChyZXN1bHQp
['10 x 3 x 5', '24,9 x 12,2 x 12,3', '10x2', '10x2', '24,9x12,2']