Вы можете сделать это, используя приведенный ниже фрагмент кода.
const filterString = (file, string) => {
let result = file.split(',').filter(word => word !== string).join(',')
return result
}
// In your case you would read this in from the file system
// Using Node it would be the fs library, fs.readFileSync(path, utf8)
https://nodejs.org/dist/latest-v10.x/docs/api/fs.html#fs_fs_readfilesync_path_options
let file = `39km,Sedan,Manual,4738B,AWD,Used,5.5L/100km,Toyota,prius,SE,{AC, Heated Seats, Heated Mirrors, Keyless Entry},2010
39km,Sedan,Manual,4738B,AWD,Used,5.5L/100km,Toyota,prius,SE,{AC, Heated Seats, Heated Mirrors, Keyless Entry},2010
39km,Sedan,Manual,4738B,AWD,Used,5.5L/100km,Toyota,prius,SE,{AC, Heated Seats, Heated Mirrors, Keyless Entry},2010
39km,Sedan,Manual,4738B,AWD,Used,5.5L/100km,Toyota,prius,SE,{AC, Heated Seats, Heated Mirrors, Keyless Entry},2010
39km,Sedan,Manual,4738B,AWD,Used,5.5L/100km,Toyota,prius,SE,{AC, Heated Seats, Heated Mirrors, Keyless Entry},2010
39km,Sedan,Manual,4738B,AWD,Used,5.5L/100km,Toyota,prius,SE,{AC, Heated Seats, Heated Mirrors, Keyless Entry},2010
39km,Sedan,Manual,4738B,AWD,Used,5.5L/100km,Toyota,prius,SE,{AC, Heated Seats, Heated Mirrors, Keyless Entry},2010
39km,Sedan,Manual,4738B,AWD,Used,5.5L/100km,Toyota,prius,SE,{AC, Heated Seats, Heated Mirrors, Keyless Entry},2010
39km,Sedan,Manual,4738B,AWD,Used,5.5L/100km,Toyota,prius,SE,{AC, Heated Seats, Heated Mirrors, Keyless Entry},2010
`
let result = filterString(file, 'prius')
console.log(file, result)