It would be helpful if you could show us the format of the file with the names. If it is just a long list of names, one after another, without any delimiters, I'm afraid there is no solution for your problem.
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
Comment on Re: Changing from full name to last, first mid