Welcome to WebmasterWorld Guest from

Forum Moderators: travelin cat

Message Too Old, No Replies

Grep pattern help with BBEdit



1:36 am on Oct 16, 2011 (gmt 0)

5+ Year Member

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.


11:28 pm on Oct 16, 2011 (gmt 0)

5+ Year Member

I was getting hung up on how to search with Grep - I simply had to put


in the replace part of the find dialog. and the pattern worked

Featured Threads

Hot Threads This Week

Hot Threads This Month