I am reading a csv file, containing 371 lines of text.
0þ"Text including numbers and quotes"þ4.6
I am trying to extract the texting between the þ" and "þ. How can I do this?
I am reading a csv file, containing 371 lines of text.
0þ"Text including numbers and quotes"þ4.6
I am trying to extract the texting between the þ" and "þ. How can I do this?
awk -F'þ"|"þ' '{print $2}' data.csv
The above command prints the 2nd column of each row in the file data.csv
,
where columns are separated by either a þ"
OR a "þ
.
Thanks all!
Both your responses helped me find the solution:
test = sent[(sent.index('þ"')):(sent.index('"þ'))]