我试着这个
str = "@a@b"; str2 = str.replace(/@/g,'-[' + str + ']');
输出应该是 - [a] - [b]
javascript regex
javascript ×1
regex ×1