title: What does the forward slash mean within a JavaScript regular expression?
body: <p>I can't find any definitive information on what <code>/</code> means in a JavaScript regex. </p>
  
  <p>The code <code>replace(/\r/g, '');</code></p>
  
  <p>What I'm able to figure out is this:</p>
  
  <ul>
  <li><code>/</code>  = I don't know  </li>
  <li><code>\r</code> = carriage return  </li>
  <li><code>/g</code> = I don't know but It may mean 'the match must occur at the point where the previous match ended.'</li>
  </ul>