reverse first and last names in calc

Is there a simple function of formula that will reverse the first and last names in a column of names?

The solution depends on details - e.g. if there are

  • only two words firstname lastname in cell A1 then =REGEX(A1;"(\b.+)(\b.+)";"$2 $1") will switch to lastname firstname,

but I’m pretty sure you have some exceptions to that simple “2-words separated by one or more spaces”-data layout. That’s why I won’t provide an answer/solution but request more details about the data layout.