[Solved] Replace string with substring with regular expression
var str = “1200,00”.split(“,”)[0]; alert(str); using .replace it will replace all characters with ” after the comma. var str = “1200,00”.replace(/,.*/, ”); alert(str); 3 solved Replace string with substring with regular expression