remove string from string

remove string from string

Hi, I am trying to remove a string from a string.

Here is the string:

username1, username2 and username3 like this post.

I would like to remove username1 from this list.
I tried adding the list to an array using .split(', ') but I got an error. Im assuming because not every word has a , after it.

Any help is appreciated. Thanks