[Solved] remove white space before comma


You need to use:

$('[data-title="Score"]').text().replace(/ \,/g, ','); //or .replace(" ,", ','); for single occurence

if you want to replace the text :

$('[data-title="Score"]').text(function( index,text ) {
  return text.replace(/ \,/g, ','); //or .replace(" ,", ','); for single occurence
});

Working Demo

3

solved remove white space before comma