title: Regex replace all newline characters with comma
body: <p>With regex, how do I replace each newline char (\n) with a comma (,)?</p>
  
  <p>Like this:</p>
  
  <pre><code>Demetrius Navarro
  Tony Plana
  Samuel L. Jackson
  </code></pre>
  
  <p>To:</p>
  
  <pre><code>Demetrius Navarro,Tony Plana,Samuel L. Jackson
  </code></pre>
  
  <p>Not in a particular programming lang, just standard regex. Something like this: </p>
  
  <pre><code>(.*)
  $1
  //This just takes the whole string and outputs it as is, I think
  </code></pre>