How to split string in correct way?
For example, I have this string:
a = "Hello, @USER_ID:1@, how are you?"
I need to turn this string into array of words:
["Hello, ", "@USER_ID:1@", ", how are you?"]
I've tried this piece of code:
a.split(/\@USER_ID:([0-9]+)\@/)
But it returns this:
["Hello, ", "1", ", how are you?"]
What is the proper way to split this string?
lang-js