SyntaxFix
Write A Post
Hire A Developer
Questions
Use the global flag in regexp:
global
var replaced = str.replace(/%20/g, " "); ^