I want to use regex_replace to remove phrases that exist in one (or both) of two columns. So from the product name I want to remove the colour and brand that exist in the colour or brand columns. I have regex like this, but I wonder if you can do it without nesting?
regexp_replace(regexp_replace(lower(product_name),
lower(Manufacturer_Brand_Name), ''),lower(Colour), '')
so instead of the above have something like
regexp_replace(lower(product_name),
(lower(Manufacturer_Brand_Name)|lower(Colour)), '')
But obviously you have to put it in quotation marks to read as regex, so then I'm not actually inputting the column names
regexp_replace(lower(product_name),
'(lower(Manufacturer_Brand_Name)|lower(Colour))', '')
The expected result is Dell Laptop Blue to just Laptop