title: javascript undefined elements occurs during regex split
body: <p>The following code results in undefined element at the middle</p>
  
  <pre><code>"Hello World\n\nhello world".split(/\n(\n|\t|\s)*?\n/)
  "Hello World\n\nhello world".split(/\n(\n|\t|\s)*\n/)
  </code></pre>
  
  <p>The output is</p>
  
  <pre><code>["Hello World", undefined, "hello world"]
  </code></pre>
  
  <p>I wanted to split if there were two new line characters with any number of new line or space or tab character between them as long as they are not alphabets or symbols or numbers.</p>