Monday, July 08, 2013

JavaScript replaceAll Example

I needed a JavaScript "replaceAll" function on a string. Note the global flag /g The output is:
John.Jacob.Jingleheimer.Smith
John Jacob Jingleheimer Smith

No comments: