I have manufacture name and a product name which has manufacture name and I want to remove manufacture name form product name, I use the following code but didn't work
I tried both sub and replace methods but didn't work
import re
menufacture_name = "AMPHENOL ICC (COMMERCIAL PRODUCTS)"
product_name = "AMPHENOL ICC (COMMERCIAL PRODUCTS) - D-SUB CONNECTOR, PLUG, 9POS"
// product_name = re.sub(menufacture_name + " - ", "", product_name)
product_name.replace(menufacture_name + " - ", '')
print("Product name : " + product_name)
This should be the result Product name : D-SUB CONNECTOR, PLUG, 9POS