title: Need to do a right trim on ajax query in javascript?
body: <p>In JavaScript, I wanted to do the right trim for all the special characters at the end of the string.
  My Piece of code doing the trim for hyphen (-) only..Need for all the special characters(:.,()+-=/[]\@#$%^&amp;*) as well.</p>
  
  <pre><code>var s = "DB-";
  var x = s.replace(/-+$/,'');
  console.log(x);
  </code></pre>
  
  <p>Any help on this?</p>