I am trying to replace all instances of
- in my GUID using SSJS in Marketing Cloud.
var job_guid = 'aad2c93e-0e3e-4ec5-8592-f4ff510c1d94'; var stripped_guid = job_guid.replace('-', ''); Write('giud:' + job_guid + '<br>'); Write('stripped_guid:' + stripped_guid + '<br>');
The code above only seems to replace the first instance of
- but not the rest.
Is there something I'm missing?