OK, then I think my approach would be to split up the string into its component parts. If you get 2 pieces you must have just first name, surname. If you get 4, it will be 1st name, initial, surname, suffix.
If you get 3 and the second is a single character, I think it is safe to assume that is a middle initial. If not, that it is a surname so the last element is a suffix. When you know what each component is, reconstitute it in the format you require in the end