import re
text = '''5.3 x 2.5 cm
11 x 11 mm
7 mm
13 x 12 x 14 mm
13x12cm'''
x = "(?:\.\d{1,2}|\d{1,4}\.?\d{0,2}|\d{5}\.?\d?|\d{6}\.?)"
by = "(?: )?(?:by|x)(?: )?"
cm = "(?:mm|cm|millimeter|centimeter|millimeters|centimeters)"
x_cm = "(?:" + x + " *(?:to|\-) *" + cm + "|" + x + cm + ")"
xy_cm = "(?:" + x + cm + by + x + cm +"|" + x + by + x + cm +"|" + x + cm + by + x +"|" + x + by + x + ")"
xyz_cm = "(?:" + x + cm + by + x + cm + by + x + cm + "|" + x + by + x + by + x + cm + "|" + x + by + x + by + x + ")"
m = "{}|{}|{}".format(xyz_cm, xy_cm, x_cm)
a = re.compile(m)
print a.findall(text)
aW1wb3J0IHJlCnRleHQgPSAnJyc1LjMgeCAyLjUgY20KMTEgeCAxMSBtbQo3IG1tIAoxMyB4IDEyIHggMTQgbW0KMTN4MTJjbScnJwp4ID0gIig/OlwuXGR7MSwyfXxcZHsxLDR9XC4/XGR7MCwyfXxcZHs1fVwuP1xkP3xcZHs2fVwuPykiCmJ5ID0gIig/OiApPyg/OmJ5fHgpKD86ICk/IgpjbSA9ICIoPzptbXxjbXxtaWxsaW1ldGVyfGNlbnRpbWV0ZXJ8bWlsbGltZXRlcnN8Y2VudGltZXRlcnMpIgp4X2NtID0gIig/OiIgKyB4ICsgIiAqKD86dG98XC0pICoiICsgY20gKyAifCIgKyB4ICsgY20gKyAiKSIKeHlfY20gPSAiKD86IiArIHggKyBjbSArIGJ5ICsgeCArIGNtICsifCIgKyB4ICsgYnkgKyB4ICsgY20gKyJ8IiArIHggKyBjbSArIGJ5ICsgeCArInwiICsgeCArIGJ5ICsgeCArICIpIgp4eXpfY20gPSAiKD86IiArIHggKyBjbSArIGJ5ICsgeCArIGNtICsgYnkgKyB4ICsgY20gKyAifCIgKyB4ICsgYnkgKyB4ICsgYnkgKyB4ICsgY20gKyAifCIgKyB4ICsgYnkgKyB4ICsgYnkgKyB4ICsgIikiCm0gPSAie318e318e30iLmZvcm1hdCh4eXpfY20sIHh5X2NtLCB4X2NtKQphID0gcmUuY29tcGlsZShtKQpwcmludCBhLmZpbmRhbGwodGV4dCkK