The task is to find names with regex. A name can contain only latin (english) characters, it must start with an uppercase letter, the others are lowercase. There can be several parts of the name separated by space, it can contain abbreviated names: a capital letter and a dot, but not as the last name.
Paul Erdos Gabor Kiraly Maria Gaetana Agnesi Donald J. Trump J. F. Kennedy Madonna
You can try it on a wikipedia article.
Counter examples, the followings do not count as names:
paul erdos Gabor K. John von Neumann Abraham deMoivre
Write a substitution rule that replaces the found names with the last name only:
Erdos Kiraly Agnesi Trump Kennedy Madonna
The maximum point is 3 for this homework.
Send the regex and substitution string from your math account to email@example.com with a subject specified in the Informatics1-2018#Rules. You don't have to attach any file, just write the regex in the email.