Goran WitchDoc
ServiceNow Employee

Hi David,

You can do this by regEx and replace. Here is an example you can test and reuse pretty much:

var test = 'goran - remove this';

gs.debug(test.replace(/\s[-]\s.*/, ''));

//Göran
Feel free to connect:
LinkedIn
Subscribe to my YouTube Channel
or look at my Book: The Witch Doctor's Guide To ServiceNow

View solution in original post