require('fs'). readFileSync('file.txt', 'utf-8'). split(/ ? /). forEach(function(line){ console. log(line); })