hello i have a txt problem but when i deleted the line i have a space i want to remove the line spacing
my txt is like this
I tried to erase it in regex in several ways none works I tried with his [\ r \ n] +. and its ^ (?: [\ t] * (?: \ r? \ n | \ r)) +
and its \ s + (?! [^,])
is there the possibility of simulating a key down arrow and a backspace or if you have a better solution I am a taker ->first line abc abc
fs = require('fs');
data = fs.readFileSync('list.txt', 'UTF-8');
lines = data.split('\r\n');
for(var i = 0; i < lines.length; i++){
var newValue = data.replace(lines[i] , '');
fs.writeFileSync('list.txt' , newValue );