Try:
public static Regex regex = new Regex(
"(?<Words>[\\w\\s]+)(?<Term>,|$)",
RegexOptions.IgnoreCase
| RegexOptions.Multiline
| RegexOptions.CultureInvariant
| RegexOptions.IgnorePatternWhitespace
| RegexOptions.Compiled
);
public static string regexReplace =
"team${Term}";
string words="samuel king,rani queen,sastry poet";
string result = regex.Replace(words,regexReplace);