Trying to extract size information from product names:
Product A 30" Metalic Grey
Product B 31.50" Led 54 watt
Product C 40"-60" Dark Green
The current code for fetching size information is:
var product_name = $(this).text();
product_name.split('"')[0].slice(-2);
Encountering difficulty with sizes containing decimal points like 31.50".
Looking for a better way to extract sizes from the given product names, especially when dealing with size ranges like the third product which should return the larger value of 60.