title: How to loop through series of addresses in a text file and get individual fields in Node.js
body: <p>I have a text file with multiple addresses in the following format:</p>
  <p>335 Ahan St.<br />
  Haines City, US 30721</p>
  <p>786 Birchmount Dr.<br />
  Waterloo, IA 52001</p>
  <p>How can I loop through these lines and get individual fields like Street number, street name, city, state, postal code in Node.js</p>
  <pre><code>const fs = require('fs');
  const readline = require('readline');
  
  const parseAddressFile = path =&gt; {
    const data = readline.createInterface({
      input: fs.createReadStream(path)
    });
    
    data.on('line', (line)=&gt; {
      var address1= line.split(&quot; &quot;)[0];
      
      console.log(address1)
    })
  };
  </code></pre>
  <p>I'm using readline module and I'm basically stuck after this.</p>