I assume you are using a document class that requires authors are specified with
\author{Last}{First Middle}
It would be better to know the class, so as to make the experiment on the real example. Anyway, here's how you could do.
I use the article class, but fake yours by redefining the \author command and also defining a \useauthor for testing; the class will probably use the data in a different way, but it should be unimportant.
\documentclass{article} % let's emulate what the (unknown) used class does \makeatletter \def\author#1#2{\gdef\@authorlast{#1}\gdef\@authorfirstmiddle{#2}} \def\useauthor{\@authorlast, \@authorfirstmiddle} % for testing \makeatother % your modification should go in the preamble, before any \author command is used \makeatletter \let\class@author\author \renewcommand{\author}[1]{% % split the data \def\gp@firstmiddle{}% \gp@divide{#1}% } \newcommand\gp@divide[1]{% \gp@@divide#1 \@nil } \def\gp@@divide#1 #2\@nil{% \if\relax\detokenize{#2}\relax \def\gp@last{#1}% \expandafter\@firstoftwo \else \ifx\gp@firstmiddle\@empty \def\gp@firstmiddle{#1}% \else \edef\gp@firstmiddle{\unexpanded\expandafter{\gp@firstmiddle} \unexpanded{#1}}% \fi \expandafter\@secondoftwo \fi {\gp@author}% {\gp@@divide#2\@nil}% } \def\gp@author{% \expandafter\expandafter\expandafter\class@author \expandafter\expandafter\expandafter {\expandafter\gp@last\expandafter}\expandafter{\gp@firstmiddle}% } \makeatother \begin{document} \author{First Middle Last} \useauthor \author{First Last} \useauthor \author{Last} \useauthor \end{document}

A shorter code:
\documentclass{article} % let's emulate what the (unknown) used class does \makeatletter \def\author#1#2{\gdef\@authorlast{#1}\gdef\@authorfirstmiddle{#2}} \def\useauthor{\@authorlast, \@authorfirstmiddle} % for testing \makeatother \usepackage{xparse} % your modification \ExplSyntaxOn \cs_set_eq:NN \gp_author_class:nn \author \RenewDocumentCommand{\author}{m} { \seq_set_split:Nnn \l_tmpa_seq { ~ } { #1 } \seq_pop_right:NN \l_tmpa_seq \l_tmpa_tl % last \use:x { \exp_not:N \gp_author_class:nn { \exp_not:V \l_tmpa_tl } { \seq_use:Nn \l_tmpa_seq { ~ } } } } \ExplSyntaxOff \begin{document} \author{First Middle Last} \useauthor \author{First Last} \useauthor \author{Last} \useauthor \end{document}
\author{Last}{First Middle}it is necessary to know about it.stringstrings, I recommend using it only as a last resort. Instead, here, I thinklistofitemspackage can help:\setsepchar{ } \readlist\nameparts{First Middle Last} \author{\nameparts[3]}{\nameparts[1] \nameparts[2]}listofitemsas suggested by @StevenB.Segletes.