相关文章推荐
热心的西装  ·  Feign Client without ...·  11 月前    · 
含蓄的葡萄酒  ·  python 线程中断-掘金·  1 年前    · 
冷静的肉夹馍  ·  vue 报错:Module not ...·  1 年前    · 
let str = '12×3÷4+6-9'; // 按照 × ÷ + - 分割 使用正则的方式分割 加号是正则的关键字,使用[+] let strArr = str.split(/×|-|÷|[+]/); console.log(strArr); // ["12", "3", "4", "6", "9"]

参考链接: https://blog.csdn.net/qq_23350817/article/details/85275244