homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / Apple Software and Technology
Forum Library, Charter, Moderators: travelin cat

Apple Software and Technology Forum

Grep pattern help with BBEdit

5+ Year Member

Msg#: 4375032 posted 1:36 am on Oct 16, 2011 (gmt 0)

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.



5+ Year Member

Msg#: 4375032 posted 11:28 pm on Oct 16, 2011 (gmt 0)

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

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Apple Software and Technology
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved