You don't want to do this, unless you are only going to be contacting people from one culture.
For example:
Guido van Rossum's last name is van Rossum.
MIYAZAKI Hayao's first name is Hayao.
The most success you could do is to strip off common titles and salutations, and try some heuristics.
Even so, the easiest solution is to just store the full name, or ask for given and family name seperately.