/ Published in: JavaScript
For those moments of weakness when .replace() looks like a good idea...
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// Bad example but you get where I'm going with this. my_string = "{{some_var}} weather out today"; my_string.replace(/\{\{(.+?)\}\}/g, 'great');