Reputation: 829
I 've a field "comment" in a csv file who can contains any char and several lines.
Example :
firstname;lastname;comment
toto;titi;"Hi, you ok ?
yes and you ?"
pierre;tutu;"nice; i love that."
foo;bar;"ko ""lol"""
michu;ferro;"ok ""
but it's strange
"""
i need to inline each csv records.
Expected :
firstname;lastname;comment
toto;titi;"Hi, you ok ? yes and you ?"
pierre;tutu;"nice; i love that."
foo;bar;"ko ""lol"""
michu;ferro;"ok ""but it's strange"""
i tried something like that : https://regex101.com/r/SzJuUl/1 in vain. Someone can help me ?
Thanks
Upvotes: 0
Views: 56
Reputation: 892
(?<!")\n
It lookout for new line that is not preceded by '"'. Hope it helps.
Upvotes: 1