import re

regex = r"\b(?:MS|PhD)\s*((?:(?!\b(?:MS|PhD)\b).)*)[.,]"
s = ("Candidate with MS or PhD in Statistics, Computer Science, or similar field.\n"
	"Applicant with MS in Biology or Chemistry desired.")

matches = re.findall(regex, s)
print(matches)