title: string.replace not working in node.js express server
body: <p>I need to read a file and replace some texts in that file with dynamic content.when i tried string.replace it is not working for the data that i read from the file.But for the string it is working.I am using node.js and express.</p>
  
  <pre><code>fs.readFile('test.html', function read(err, data) {
      if (err) {
                  console.log(err);
      }
      else {
          var msg = data.toString();
          msg.replace("%name%", "myname");
          msg.replace(/%email%/gi, 'example@gmail.com');
  
          temp = "Hello %NAME%, would you like some %DRINK%?";
          temp = temp.replace(/%NAME%/gi,"Myname");
          temp = temp.replace("%DRINK%","tea");
          console.log("temp: "+temp);
          console.log("msg: "+msg);
      }
  });
  </code></pre>
  
  <p>Output: </p>
  
  <pre><code>temp: Hello Myname, would you like some tea?
  msg: Hello %NAME%, would you like some %DRINK%?
  </code></pre>