ECMAScript proposal: String.prototype.replaceAll

By Dr. Axel Rauschmayer

The normal string method .replace() only lets you replace one occurrence if you search for string (and not a regular expression with the flag /g). The proposal “String.prototype.replaceAll (by Mathias Bynens) fixes that.

Source:: <a href=http://feedproxy.google.com/~r/2ality/~3/rkR3ZCwf1tY/string-prototype-replaceall.html target="_blank" title="ECMAScript proposal: String.prototype.replaceAll” >2ality