for example:
var str = "I am a good friend of / @ Xiao Wang @\\ and / @ Xiao Li @\\"
becomes
var arr = ["I am", "/ @ Xiao Wang @\\", "and", "/ @ Xiao Li @\\", "good friend"]
I try str.split (/\ / @ | @\\ /)
to get "good friend of"]
needs to keep the label and order to distinguish. It is troublesome for split regular tags to be removed.
it would be better if
var arr = [{"text": "I am"}, {"name": Xiao Wang "}, {" text ":" and "}, {" name ":" Xiao Li "}, {" text ":" good friend "}]