howto remove spaces

I want to replace spaces in a jobinfo variable, but i can’t seem to get it to work.

This is the line I found: var x = Watch.GetJobInfo(4).replace(/\s+/g, ‘’);

I think it’s quite simple but I can’t get it to work.

Try changing your script to this line:

Watch.SetJobInfo(4,Watch.GetJobInfo(4).replace(/\s+/g, ''));

or to this:

var x = Watch.GetJobInfo(4).replace(/\s+/g, '');
Watch.SetJobInfo(4,x);

Thanks Rod! i knew it was this simple, but just got stuck.