How do i replace all enters between two quotes in a text file. The first quote is always preceded by a tab or it is the first character in the row (csv file). I tried the fo
With Javascript replace you can use a function as replacement.
var str = 'foo \n"a\n" bar\n';
str = str.replace(/"[^"]+"/g, function(m) {
return m.replace(/\n/g, ' ');
});
console.log(str);
The regex "[^"]+" will match quoted stuff with one or more non-quotes in between.
Add conditions such as tab or start to the pattern as needed: (?:\t|^)"[^"]+"