title: change a file using node.js
body: <p>I have a text file that looks like this:</p>
  
  <pre><code>./4F6cFLnAAFc.png
  ./4Flj9plmKGQ.png
  ./4fQeHtSdw80.png
  ./4I9iibPLdBw.png
  ./4J-dRA3MGc8.png
  ./4mdEsouIXGM.png
  ./4-_-wQc3EGE.png
  ./595Tiga1gIg.png
  ./60u_ctp6UIw.png
  ./64bH_27Ehoc.png
  ./64_ZfIemRGM.png
  ./66pQLO--Ghk.png
  ./69rDtSpshAw.png
  ./69-YUSazuic.png
  </code></pre>
  
  <p>I'd like to replace the <code>.</code> at the beginning of each line with 'myString' using node.js. So each will end up looking like: <code>myString/4F6cFLnAAFc.png</code></p>
  
  <p>I am trying to use a regular expression but I suspect it can be done using read and write streams.</p>
  
  <pre><code>var fs = require('fs');
  
  fs.readFile('filelist.txt', 'utf-8', function(err, data){
      if (err) throw err;
  
      console.log(typeof(data)); // string
  
      data.replace(/\.\/+/, 'myString');
  
  });
  </code></pre>
  
  <p>What regex will work or what's the best way to edit this file using node?</p>