eg: var str="icon icon-1chkedchkedchked";
var strNew=str.replace(new RegExp("chked","gm"),"")
returns the result strNew after replacing the string "chked" multiple times as "icon icon-1":
eg: var str="icon icon-1chkedchkedchked";
var strNew=str.replace(new RegExp("chked","gm"),"")
returns the result strNew after replacing the string "chked" multiple times as "icon icon-1":