title: Regular Expression with or without /g (CoffeeScript/JavaScript)
body: <p>Why if I add <code>/g</code> to <code>lineRoute</code> <code>parseRoute</code> function just return only one occurrence?</p>
  
  <pre><code>pkt = "Record-Route: &lt;sip:10.1.20.40;lr;r2=on&gt;\r\nRecord-Route: &lt;sip:10.1.20.40:80;transport=ws;r2=on;lr=on&gt;\r\n"
  
  parseRoute = (pkt) -&gt;
          lineRoute = /Route\:/
          route = ""
          for line in pkt.split '\r\n'
              if lineRoute.test line
                  tmp = line.split ': '
                  route += tmp[1] + ", \r\n"
          return route
  </code></pre>