I have strings that follow this format:
/users/john, /users/anna, /users/charles/something
I want to get the users name. So, it's either the word after /users/ or the word after /users/ and before another /.
How can I do that in javascript?
string.split("/")[2]will do.