title: is it possible in javascript to include other characters in jquery.Trim()
body: <p>i have a string that might look like one of these and i want to display this string on the page but remove all trailing characters (spaces, commas . )</p>
  
  <pre><code>var string1  =  "test, test1, test2, test3, ";  
  var string2  =  "test, test1, test2, test3 ";  
  var string3  =  "test, test1, test2, test3";  
  </code></pre>
  
  <p>if i use jquery.Trim() that will work for string2 and string3 but i want a solution that will remove the trailing comman from string1 as well.</p>
  
  <p>what is the best way to do this in javascript, jquery ??</p>