How to fix newline and quotation mark
-
Hi. I have csv-file with separators by comma. And there are few lines that unlike from others. They divided into new lines by some reason.
In file:
"word1","word2 ","word3 ","word4 " "nextword1","nextword2 ","nextword3 ","nextword4 "What I need:
"word1","word2","word3","word4" "nextword1","nextword2","nextword3","nextword4"Can anyone help me to fix this please?
-
without knowing what caused it is hard to tell what needs to be done.
Did you use View->Show Symbols->Show all characters to see
what has been inserted? -
@Ekopalypse all of lines ends with CRLF. But bugged rows ends without quotation mark.
Here is a normal row:
"word1","word2","word3","word4"And here is a bugged row:
"word1","word2","word3","word4As you can see, the bugged row doesn’t have quotation mark. Maybe there is a way how to find those rows?
-
-
This post is deleted! -
@Ekopalypse it works! Wonderful! Thanks :)
-
Thanks, it helps me out.
-
Hello, @Andy-Light
Please follow below steps :
Step 1:- Find (in regular expression mode)
(.+)
Step 2:- Replace with:"/1"
Step 3:- This adds the quotes :"word1" "word2" "word3" "word4"Step 4:- Find (in extended mode):
/r/n
Step 5:- Replace with (with a space after the comma, not shown):,
Step 6:- This converts the lines into a comma-separated list:
"word1", "word2", "word3", "word4"I hope above information will be useful for you.
Thank you.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login