Hello, @ryan-mclaughlin, @peterjones and All,
We must take care whether the ranges between "........." may or not contain comma(s), themselves !
if we consider the general case, where :
The field separator is the comma character
Some fields are surrounded by doubles quotes, containing possible commas or could be empty fields ( "")
Some fields do not contain any double-quote and could be empty too
The field to delete is the last field of each row, possibly followed with a comma
Then, the following regex S/R is the right solution, especially when the total number of fields of a row is inferior to the number of the field to delete !!
SEARCH (?-s)^(?:"[^"\r\n]*",|[^",\r\n]*,){N}\K(?:"[^"\r\n]*",?|[^",\r\n]*,?) where N is the number of fields right before the field to delete
REPLACE Leave EMPTY
Tick preferably the Wrap around option
Click only on the Replace All button
Test it against this two-lines text :
"ClientNumber","","First,Name",123456789,"Last,Name",2021-12-31,"Gender","","Email","AddressLine1",,"1,234.56","PhoneNo","ApprovedDate",01-34-56-78,Field to delete,"ClientDischargeDate","Case Manager(EMPID)",
"ClientNumber","","First,Name",123456789,"Last,Name",2021-12-31,"Gender","","Email","AddressLine1",,"1,234.56","PhoneNo","ApprovedDate",01-34-56-78,Last field to delete,
Note that field 12 ( "1,234.56" ) contains a decimal number with a comma separator => I surrounded this field with double-quotes to keep its meaning
Best Regards,
guy038