Skip to main content
added 637 characters in body
Source Link
Vituvo
  • 411
  • 9
  • 17

I am trying to remove the first value from the 31st column in a csv file. The columns are in quotes and separated by commas like so.

"first_name","last_name","home_address"
"Frank",Russel","123 Hampton road"

the 31st column is the image column and images are separated by commas

"http://ddd.com/124dfr3f.jpg,http://ddd.com/hjasgx37trg.jpg"

The first image and tailing comma has to be removed from the 31st column

Added - Here is an example. I removed 28 columns and this is what is left. Column three is the first image and it comes wrapped nicely. Column 3 and its image stays. Column four needs the first image removed and the trailing comma.

"options""one","optioncodes""two","first_image""three","images""four","toilet""five","next""six","seven","eight","nine","ten","eleven","twelve","three","four","five","six","seven","eight","nine","ten","twenty-one","twenty-two","three","four","five","six","seven","eight","nine","ten","thirty-one","thirty-two","three","four","five","six","seven","eight","nine","forty"
"sales""one","deeep""two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","three","four","five","six","seven","eight","nine","ten","twenty-one","twenty-two","three","four","five","six","seven","eight","nine","http://pictures....domain.com/0288e/0057320db6c6adabcec517b4e6aaf63fxjosequervo/1183/eeeffcc7927sssssssssss5d26c0eb19e1dc53548x.jpg","http://firstimage_that_needs_to_be-removed856b9xpictures.domain.com/e/josequervo/0083/eeef8cc7927bf1245d26c0eb19e1dc53545x.jpg,http://image2_-stays_and_so_onepictures.domain.com/0965e/41191dd3318cf3f6ab5b3f4ef5c32171xjosequervo/0099/eeefscc7927bf1245d26c0eb19e1dc53546x.jpg,http://image3_-stays_and_so_onepictures.domain.com/0965e/41191dd3318cf3f6ab5b3f4ef5c32171xjosequervo/0012/eeefdcc7927bf1245d26c0eb19e1dc53547x.jpg","next"

Should be

"options","optioncodes","first_image","images","toilet","next"
"sales","deeep"jpg,"httphttp://pictures.domain.com/e/josequervo/1183/eeeffcc7927bf1245d26c0eb19e1dc53548x.jpg,http://pictures.domain.com/0288e/0057320db6c6adabcec517b4e6aaf63fxjosequervo/1234/eeefgcc7927bf1245d26c0eb19e1dc53549x.jpg"jpg,"httphttp://image2_-stays_and_so_onepictures.domain.com/0965e/41191dd3318cf3f6ab5b3f4ef5c32171xjosequervo/asee/eeefhcc7927bf1245d26c0eb19e1dc53540x.jpg,http://image3_-stays_and_so_onepictures.domain.com/0965e/41191dd3318cf3f6ab5b3f4ef5c32171xjosequervo/2341/eeefjcc7927bf1245d26c0eb19e1dc53544x.jpg","next""two",three","four","five","six","seven","eight","nine","forty"

soThis url and comma has to be removed

http://firstimage_that_needs_to_be-removed856b9x.jpg,http://pictures.domain.com/e/josequervo/0083/eeef8cc7927bf1245d26c0eb19e1dc53545x.jpg,

I only posted the first 2 lines of the csv file but the file is 300 - 400 lines and this image has to be removed from line 2 to the last line. We can't alter the first line.

I am trying to remove the first value from the 31st column in a csv file. The columns are in quotes and separated by commas like so.

"first_name","last_name","home_address"
"Frank",Russel","123 Hampton road"

the 31st column is the image column and images are separated by commas

"http://ddd.com/124dfr3f.jpg,http://ddd.com/hjasgx37trg.jpg"

The first image and tailing comma has to be removed from the 31st column

Added - Here is an example. I removed 28 columns and this is what is left. Column three is the first image and it comes wrapped nicely. Column 3 and its image stays. Column four needs the first image removed and the trailing comma.

"options","optioncodes","first_image","images","toilet","next"
"sales","deeep","http://pictures.....com/0288/0057320db6c6adabcec517b4e6aaf63fx.jpg","http://firstimage_that_needs_to_be-removed856b9x.jpg,http://image2_-stays_and_so_one/0965/41191dd3318cf3f6ab5b3f4ef5c32171x.jpg,http://image3_-stays_and_so_one/0965/41191dd3318cf3f6ab5b3f4ef5c32171x.jpg","next"

Should be

"options","optioncodes","first_image","images","toilet","next"
"sales","deeep","http://pictures.....com/0288/0057320db6c6adabcec517b4e6aaf63fx.jpg","http://image2_-stays_and_so_one/0965/41191dd3318cf3f6ab5b3f4ef5c32171x.jpg,http://image3_-stays_and_so_one/0965/41191dd3318cf3f6ab5b3f4ef5c32171x.jpg","next"

so

http://firstimage_that_needs_to_be-removed856b9x.jpg,

is removed

I am trying to remove the first value from the 31st column in a csv file. The columns are in quotes and separated by commas like so.

"first_name","last_name","home_address"
"Frank",Russel","123 Hampton road"

the 31st column is the image column and images are separated by commas

"http://ddd.com/124dfr3f.jpg,http://ddd.com/hjasgx37trg.jpg"

The first image and tailing comma has to be removed from the 31st column

Added - Here is an example.

"one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","three","four","five","six","seven","eight","nine","ten","twenty-one","twenty-two","three","four","five","six","seven","eight","nine","ten","thirty-one","thirty-two","three","four","five","six","seven","eight","nine","forty"
"one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","three","four","five","six","seven","eight","nine","ten","twenty-one","twenty-two","three","four","five","six","seven","eight","nine","http://pictures.domain.com/e/josequervo/1183/eeeffcc7927sssssssssss5d26c0eb19e1dc53548x.jpg","http://pictures.domain.com/e/josequervo/0083/eeef8cc7927bf1245d26c0eb19e1dc53545x.jpg,http://pictures.domain.com/e/josequervo/0099/eeefscc7927bf1245d26c0eb19e1dc53546x.jpg,http://pictures.domain.com/e/josequervo/0012/eeefdcc7927bf1245d26c0eb19e1dc53547x.jpg,http://pictures.domain.com/e/josequervo/1183/eeeffcc7927bf1245d26c0eb19e1dc53548x.jpg,http://pictures.domain.com/e/josequervo/1234/eeefgcc7927bf1245d26c0eb19e1dc53549x.jpg,http://pictures.domain.com/e/josequervo/asee/eeefhcc7927bf1245d26c0eb19e1dc53540x.jpg,http://pictures.domain.com/e/josequervo/2341/eeefjcc7927bf1245d26c0eb19e1dc53544x.jpg","two",three","four","five","six","seven","eight","nine","forty"

This url and comma has to be removed

http://pictures.domain.com/e/josequervo/0083/eeef8cc7927bf1245d26c0eb19e1dc53545x.jpg,

I only posted the first 2 lines of the csv file but the file is 300 - 400 lines and this image has to be removed from line 2 to the last line. We can't alter the first line.

added example
Source Link
Vituvo
  • 411
  • 9
  • 17

I am trying to remove the first value from the 31st column in a csv file. The columns are in quotes and separated by commas like so.

"first_name","last_name","home_address"
"Frank",Russel","123 Hampton road"

the 31st column is the image column and images are separated by commas

"http://ddd.com/124dfr3f.jpg,http://ddd.com/hjasgx37trg.jpg"

The first image and tailing comma has to be removed from the 31st column

Added - Here is an example. I removed 28 columns and this is what is left. Column three is the first image and it comes wrapped nicely. Column 3 and its image stays. Column four needs the first image removed and the trailing comma.

"options","optioncodes","first_image","images","toilet","next"
"sales","deeep","http://pictures.....com/0288/0057320db6c6adabcec517b4e6aaf63fx.jpg","http://firstimage_that_needs_to_be-removed856b9x.jpg,http://image2_-stays_and_so_one/0965/41191dd3318cf3f6ab5b3f4ef5c32171x.jpg,http://image3_-stays_and_so_one/0965/41191dd3318cf3f6ab5b3f4ef5c32171x.jpg","next"

Should be

"options","optioncodes","first_image","images","toilet","next"
"sales","deeep","http://pictures.....com/0288/0057320db6c6adabcec517b4e6aaf63fx.jpg","http://image2_-stays_and_so_one/0965/41191dd3318cf3f6ab5b3f4ef5c32171x.jpg,http://image3_-stays_and_so_one/0965/41191dd3318cf3f6ab5b3f4ef5c32171x.jpg","next"

so

http://firstimage_that_needs_to_be-removed856b9x.jpg,

is removed

I am trying to remove the first value from the 31st column in a csv file. The columns are in quotes and separated by commas like so.

"first_name","last_name","home_address"
"Frank",Russel","123 Hampton road"

the 31st column is the image column and images are separated by commas

"http://ddd.com/124dfr3f.jpg,http://ddd.com/hjasgx37trg.jpg"

The first image and tailing comma has to be removed from the 31st column

Added - Here is an example. I removed 28 columns and this is what is left. Column three is the first image and it comes wrapped nicely. Column 3 and its image stays. Column four needs the first image removed and the trailing comma.

"options","optioncodes","first_image","images","toilet","next"
"sales","deeep","http://pictures.....com/0288/0057320db6c6adabcec517b4e6aaf63fx.jpg","http://firstimage_that_needs_to_be-removed856b9x.jpg,http://image2_-stays_and_so_one/0965/41191dd3318cf3f6ab5b3f4ef5c32171x.jpg,http://image3_-stays_and_so_one/0965/41191dd3318cf3f6ab5b3f4ef5c32171x.jpg","next"

I am trying to remove the first value from the 31st column in a csv file. The columns are in quotes and separated by commas like so.

"first_name","last_name","home_address"
"Frank",Russel","123 Hampton road"

the 31st column is the image column and images are separated by commas

"http://ddd.com/124dfr3f.jpg,http://ddd.com/hjasgx37trg.jpg"

The first image and tailing comma has to be removed from the 31st column

Added - Here is an example. I removed 28 columns and this is what is left. Column three is the first image and it comes wrapped nicely. Column 3 and its image stays. Column four needs the first image removed and the trailing comma.

"options","optioncodes","first_image","images","toilet","next"
"sales","deeep","http://pictures.....com/0288/0057320db6c6adabcec517b4e6aaf63fx.jpg","http://firstimage_that_needs_to_be-removed856b9x.jpg,http://image2_-stays_and_so_one/0965/41191dd3318cf3f6ab5b3f4ef5c32171x.jpg,http://image3_-stays_and_so_one/0965/41191dd3318cf3f6ab5b3f4ef5c32171x.jpg","next"

Should be

"options","optioncodes","first_image","images","toilet","next"
"sales","deeep","http://pictures.....com/0288/0057320db6c6adabcec517b4e6aaf63fx.jpg","http://image2_-stays_and_so_one/0965/41191dd3318cf3f6ab5b3f4ef5c32171x.jpg,http://image3_-stays_and_so_one/0965/41191dd3318cf3f6ab5b3f4ef5c32171x.jpg","next"

so

http://firstimage_that_needs_to_be-removed856b9x.jpg,

is removed

Title typos.
Link
user232326
user232326

How to delete the the first value and tailingtrailing comma from the 7th column in a csv file

added 626 characters in body; edited title
Source Link
Vituvo
  • 411
  • 9
  • 17
Loading
improved formatting
Source Link
Thomas
  • 6.6k
  • 8
  • 31
  • 34
Loading
edited tags
Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 264
Loading
Source Link
Vituvo
  • 411
  • 9
  • 17
Loading