Hello regex experts!
Question One I want to find the sub string 'delimiter' and remove it as well as anything following it so the result is 'fredrobert'
var originalstring = 'fredrobertdelimitergarysusan';
var result = orig.match(/* not sure what goes here*/);
console.log('result = ',result); //fredrobert
Question Two I want to find the sub string 'delimiter' and remove it as well as anything preceding it so the result is 'garysusan'
var originalstring = 'fredrobertdelimitergarysusan';
var result = orig.match(/* not sure what goes here*/);
console.log('result = ',result); //garysusan
Question Three I want to find the sub strings 'delimiterA' and 'delimiterB' remove them as well as what is betweenso the result is 'fredsusan'
var originalstring = 'freddelimiterArobertgarydelimiterBsusan';
var result = orig.match(/* not sure what goes here*/);
console.log('result = ',result); //fredsusan
delimiter, then take a substring either up to or after that location (plusdelimiterlength). For the third one, consider/^(.*?)delimiter.*delimiter(.*?)$/