I have a vector that I need to extract the last name into a list. I will then use the list to compare against a set of last names using match. I am having issues doing extracting the last name. Here is an example of 

```
Suzanne Sar Abay bob, Lucy Heaton, Lynn Slaney, Michael Hughes,

```

I need to the last names of these.

```
vector <- gsub("\s(\w+)$", "", data_agent$Name, perl = TRUE)

```

This ends up giving me the Suzanne Sar Abay, Lucy, Lynn, Michael. Not the last names. Regex selects the last name successfully. However, realized `gsub` replaces the value. 

```
vector1 <- gsub("(.+)\s\w+$", "", data_agent$List.Name, perl = TRUE)

```

This is suppose to select everything except the last name but it is not working. All it returns is blanks. "" "" ""

I was wondering if someone can help me with this?