I have a CSV text file in a similar layout to below
COL1, COL2, COL3, ADDRESS1, COL5, COL6, COL7
dsada34sdsad5asdas, dasd32sadasd232as, fioejwfw667eoefw, 1 Terrace Lane, goirgngniogri,giergrngernn, gireneogner
I am trying to use a regex to put quotation marks around everything in ADDRESS1, so the only way I can seem to find the contents between is working out that after the 3rd comma is where my address starts and 3 commas back from the end is where my address ends.
I've currently used ^([^,]),([^,]),([^,]*), which selects from the start of each line to the 3rd comma. But replacing this then deletes all of that selection rather than appending a " mark to the start of address. Then I haven't quite figured out how to do the same but in reverse from the end of each line so I assume it will be a 2-step process.
UPDATE
ewwefeuuiofew99,6743964398hfjkef,gfbweifgbewifew665465,PARTOFADDRESS1,,,,, PARTOFADDRESS2,,, PARTOFADDRESS3,PARTOFADDRESS4, PARTOFADDRESS5, PARTOFADDRESS6,098304830gdsgsd,2014-08-08 00:00,,Yes
As you can see there are alot of commas floating throughout the data (unfortunately that's how I got it) so in your example it only highlights PARTOFADDRESS1.