title: Regex - remove any number of commas at the end of a line
body: <p>Alright, Regex gurus, how can I change my logic to fix this one?</p>
  
  <p>I've made a regex: </p>
  
  <pre><code>(,[,]+)
  </code></pre>
  
  <p>It's supposed to remove extra commas on the end of a line. (end of line being \r\n) when formatted as a string.</p>
  
  <p>It works (sort of).</p>
  
  <p>This is the string:</p>
  
  <pre><code>Date,1-Jul-18,1-Jul-19,1-Jul-20,1-Jul-21,1-Jul-22,1-Jul-23,1-Jul-24,\r\nDate,1-Jul-18,1-Jul-19,1-Jul-20,1-Jul-21,1-Jul-22,1-Jul-23,1-Jul-24,,,,,\r\nDate,1-Jul-18,1-Jul-19,1-Jul-20,1-Jul-21,1-Jul-22,1-Jul-23,1-Jul-24,,,,,\r\nDate,1-Jul-18,1-Jul-19,1-Jul-20,1-Jul-21,1-Jul-22,1-Jul-23,1-Jul-24,,\r\n
  </code></pre>
  
  <p>When I run that regex, it gives a result of:</p>
  
  <pre><code>Date,1-Jul-18,1-Jul-19,1-Jul-20,1-Jul-21,1-Jul-22,1-Jul-23,1-Jul-24,\r\nDate,1-Jul-18,1-Jul-19,1-Jul-20,1-Jul-21,1-Jul-22,1-Jul-23,1-Jul-24\r\nDate,1-Jul-18,1-Jul-19,1-Jul-20,1-Jul-21,1-Jul-22,1-Jul-23,1-Jul-24\r\nDate,1-Jul-18,1-Jul-19,1-Jul-20,1-Jul-21,1-Jul-22,1-Jul-23,1-Jul-24\r\n
  </code></pre>
  
  <p>I need to remove the comma at the end of the first line (I think I need to be finding \r\n and killing any commas before that, until a non-comma.</p>
  
  <p>Any thoughts about how to do this?</p>
  
  <p>Thanks</p>