I am trying to delete a field based on a value in one of the subfields. I would like to remove the below Field with the Field value "Field8". I know how to find the number of fields and iterate. If I just use "" I still get a tilde at the end.

Ex .

|Field^Field1^Field3~Field4^Field5^Field6~Field7^Field8^Field8

0 3
0 249