I use the following regex (probably in a FAQ somewhere) for splitting names into a first and last name, to create 'Firstname, Lastname' ARTISTSORT fields:
^(.+)\s(.+)$ -> $2, $1
This works well for most names, even those where the artist has a middle name, since it splits on the last space in the string:
John Lee Hooker --> Hooker, John Lee
The trouble is that it doesn't handle cases where an artist has a two words in their last name, e.g.
Townes Van Zandt --> Zandt, Townes Van
This should instead be
Van Zandt, Townes
So I need a regex that will split strings on the first space instead of the last.