I have a string for example:
str1 = \"\'107.8X98x3.75\'\" [107.8, 98, 3.75] str2 = \'L=130.5mm;L=90mm\' [130.5, 90] str3 = \'圓278.5x15t 304\' [278.5, 15, 304
How about regular expressions?
Example
>>> import re >>> str1="107.8X98x3.75" >>> re.findall(r'\d+(?:\.\d+)?', str1) ['107.8', '98', '3.75']