I have a column "name" that contain first and last names. Some entries have 3 or 4 first names. Examples of names are:

```
         "Max Mustermann" 
         "Max Christian Mustermann"  
         "Max Christian von Mustermann"

```

I need to split those names into two seperate columns "firstname" and "lastname".
last name I get with the following statement I found on stack overflow:

```
UPDATE table SET 
lastname = regexp_replace(name, '^.* ', '')

```

For the first name I need to return everything except that?
At the moment I'm trying to read into the regexp\_replace function but I find it hard to understand. I would appreciate some help.