To replace in vi mode

I have a string like below in a comma delimted file, which is of 7th position.

""1234""
""345""

I want to replace it globally such that the first and last double quotes should be removed for all string at the 7th postion.

:%s/""1234""/"1234"/g

.But where I can replace only this string since all the entries at that particular position varies

What does "in vi mode" mean? Do you mean you are using vi to edit your file and you are currently in command mode?

Please post a few lines from your file before the changes you're trying to make, and show us what you want it to look like after the edits so we have sample data we can use to verify that we're doing what you want done!

  1. Are there any occurrences of two adjacent double-quotes in other fields?
  2. Do all lines have two pairs of double double-quotes in the 7th field?
  3. Are all of the characters between the double double-quotes in the 7th field numeric?
  4. Are there always four characters between the double double-quotes in field 7?
  5. Are there any other fields that might have four characters between pairs of double double-quotes?

If the comma-separated fields do never contain commas (in quotes), you can skip the first 6 fields with

^\([^,]*,\)\{6\}