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