Nezir Zahirovic
Nezir Zahirovic

String.prototype.replace supports replacement patterns

Today I came across a blog post (it's in German though) written by Peter Kröner and learned something very astonishing.The article describes the not so well known behaviors of the method String.prototype.replace. Using this method is usually very straight forward. It supports regular expressions if you need to, but for most cases, it's defining a matching string and a replacing string.That's at least what I thought... 🙈.


String.prototype.replace supports replacement patterns #javascriptba #javascript #nodejs #reactjs #angularjs #vuejs #meteorjs #typecscript #jquery #emberjs #bosnia