I have this regex:
(\d+\.?\d*)(?=.*)(\d+\.?\d*)|(\d+\.?\d*).+diam
However, it's not working fully. It's picking up '24K Gold' It should only pick up 2 valid numbers with an x in the middle somewhere.
EDIT:
Examples:
Input:
40cm x 100cm
2.3 x 8.6
height: 100cm x width: 200.2cm
25K Gold
60 diam
50 diam
Output:
40, 100
2.3,8.6
100,200.2
60
50