Question : strip product name from website url

Hi

I have the following url in an excel sheet

http://www.mywebsite.com/product_code-123/producturl.htm
http://www.mywebsite.com/product_code-126/producturl.htm
http://www.mywebsite.com/product_code-123-rev1/producturl.htm

and I am trying to find a formula which strips out the product code section so that it returns

product_code-123
product_code-126
product_code-123-rev1

Appreciate any help with this!

Thanks

Sagar

Answer : strip product name from website url

i have just checked against the excel sheet you uploaded, it works very well.
 
excel sheet extract string
 
Random Solutions  
 
programming4us programming4us