回复/nb@/nb:
str.replace(/回复\/nb@\/nb:/ig, '')
[文字]文字[文字]
let regex = /\[.*?]/g let arr= str.match(regex) // ['文字', '文字']
let val = val.replace(/<[^>]+>/g, '')