title: Reading a tab separated data from text file in node js
body: <p>I have a <em>.txt</em> file which has <em>tab</em> (<code>\t</code>) and <em>semicolon</em> (<code>;</code>) separated data, and I want to read the data and create JSON object. I tried the regular expression but I am not able to create a proper regular expression. Any help would be appreciated.</p>
  
  <p><strong>test.txt</strong></p>
  
  <pre><code>sam tory 22;raj kumar 24
  </code></pre>
  
  <p><strong>output.json</strong></p>
  
  <pre><code>[
      {
          "Fname": "sam",
          "lastname": "troy",
          "Age": "22",
      },
      {
          "Fname": "raj",
          "lastname": "kumar",
          "Age": "24",
      }
  ]
  </code></pre>