title: Javascript Regular Expression to search a multiline textarea for an expression
body: <p>Let's say there is a textarea with the following value ('*' being used as a bullet point):</p>
  
  <pre><code>*south
  *north
  *west 
  </code></pre>
  
  <p>I want to be able to automatically generate an array of these words using Regular Expression, like this. </p>
  
  <pre><code>["south","north","west"]
  </code></pre>
  
  <p>Below is the expression I tried. </p>
  
  <pre><code>/\*.*/gm.exec(text)
  </code></pre>
  
  <p>Unfortunately it returns this instead.</p>
  
  <pre><code>["*south"]
  </code></pre>
  
  <p>Apparently, RegExp recognizes there is a line break such that it only returns the first item, yet it doesn't pick up the 2nd and 3rd lines.</p>
  
  <pre><code>/\*.*/gm.exec('*south \n *north')
  </code></pre>
  
  <p>This also has the same result.</p>