Parse measurements (multiple dimensions) from a given string in Python 3
问题 I'm aware of this post and this library but they didn't help me with these specific cases below. How can I parse measurements like below: I have strings like below; "Square 10 x 3 x 5 mm" "Round 23/22; 24,9 x 12,2 x 12,3" "Square 10x2" "Straight 10x2mm" I'm looking for a Python package or some way to get results like below; >>> a = amazing_parser.parse("Square 10 x 3 x 5 mm") >>> print(a) 10 x 3 x 5 mm Likewise; >>> a = amazing_parser.parse("Round 23/22; 24,9x12,2") >>> print(a) 24,9 x 12,2 I