remark.split("[")[0]// 截取 remark 字符串中 "[" 之前的字符 let remark = '12345[6789]' let remarkSplit = remark.split("[")[0] console.log(remarkSplit)//12345