I am processing orders from Woocommerce and sending to Xero. I have some products with similar SKUs which I want to simplify. (Woo won’t allow duplicate SKUs). I have entered the SKUs to have common details, followed by a hyphen and then the bits I want removed.
How can I replace (with nothing) all text after a given character in a line item?
As an example below are some SKUs I have and what I want them to be. Replace would do it, but I can only get it to replace a whole known string not a string with wildcard.
Input Required out
650Hi 650Hi
650Hi-Eco 650Hi
659Hi-Paint 650Hi
I had thought doing Find/Replace -* with inothing] was the kind of thing I was looking for.
Any thoughts gratefully received