Basically I'm trying to get a bit of regex to do the following... I have some data I need to split, the sample data looks like this:
Brand Name - Product Name
Another Brand - Shoe Laces
Heinz - Bakes Beans
I want to be able to select the brand name or the product name but I can't seem to do it without catching the " - " part in the regex. Anyone tell me what I'm missing out? My regex is pretty basic.
EDIT: I'm exporting a database to a spreadsheet, formatting it and importing it into a new system through a CSV. The old system used a brand name - product name method as above where as the new one uses two separate fields. Ideally I wanted to try and sneak some regex in the spreadsheet formula but now I think its going to be easier to just handle this with a script. Likely PHP although Javascript isn't ruled out.