JavaScript split().join() thousands separator replacement for .replace() for use on eBay -
i use comma separated thousands on site, works great...
str.replace(/\b(?=(\d{3})+(?!\d))/g, ",");
i'm trying implement similar method ebay using split().join(), since ebay have banned usage of .replace(), solution?
i tried using same regx inside split(), far has not worked same way.
thanks.
maybe can try use search()
index of string , remove characters given index.
var pre_string = str.substing(0, found_index); var post_string = str.substing(found_index + 3); var replaced_string = pre_string + post_string;
Comments
Post a Comment