Welcome to WebmasterWorld Guest from 220.127.116.11 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Subscribe to WebmasterWorld
Grep pattern help with BBEdit mrblond msg:4375034 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.
mrblond msg:4375253 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 /1 in the replace part of the find dialog. and the pattern worked