Is return3 what you are looking for?
Names Default To Here(1);
str = "item A, item B not detected";
return1 = Regex(Substitute(str, "not detected", ""), "\S*");
return2 = Substitute(str, "not detected", "");
return3 = Words(Substitute(str, " not detected", ""), ",");
show(return1, return2, return3);
You can just replace the one additional space with substitute and to split into a list use Words() with "," as separator
-Jarmo