I think what I want to do is a fairly common task but I've found no reference on the web.
I have a list of names, with the following pattern
'first name middle name last name last seen 10 months ago"
I want to keep only the names, to delete all the string starting from the word last, is there a way I can do it?
Example:
output = ' David Smith last seen 8 months ago'
desired_output = 'David Smith'
I thought using regular expression, but I didn't succeed.
Thanks