const regex = /@\[\w+( \w+)*\]\(\w+\)/g;
const text = `first @[Test11 Sarah](5c08b7766f91b01640e54921) second`;
const match = text.match(regex);
console.log(match); // output: ["@[Test11 Sarah](5c08b7766f91b01640e54921)"]
const splitted = text.split(regex);
console.log(splitted); //output: ["first ", " Sarah", " second"]
为什么“拆分”输出的第二个元素“ Sarah”?为什么不是"@[Test11 Sarah](5c08b7766f91b01640e54921)"
?目标是接收"@[Test11 Sarah](5c08b7766f91b01640e54921)"
作为第二个数组元素。我该如何实现?