[Solved] Replace string with substring with regular expression
[ad_1] 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 [ad_2] solved Replace string with substring with regular expression