joined:Nov 1, 2005
I've been struggling with Grep and BBEdit all day long.... I'm working with a tab-delimited file.
I'm trying to edit the 12th column "Categories>SubCategoryOne>SubCategoryTwo", leaving only the last "SubCategory#*$!" which could be the 4th or 5th SubCategory. (I'll need to replace what's left with the official Google categories later)
The lines in the CSV file look like this:
ProductLinkURL TAB ImageFileURL TAB MinimumQuantity TAB BrandName TAB IDNum TAB NEW TAB ExpDate TAB DealerName TAB PartSKU TAB ProductName TAB ProductDesc TAB MainCategory>SubCategoryOne>SubCategoryTwo>SubCategoryThree TAB ResellPrice TAB WholesalePrice TAB ShipPrice TAB TaxPrice TAB MfrPartID
I've mangled this pattern together, which finds from the beginning of each line to the 11th tab, which starts the column I need to edit:
This pattern selects from the beginning of the line to the last > character:
What I ultimately need is to select from the 10th tab character to the last > character, and delete that.
Any assistance is appreciated.