Skip to content

截取字符串

30 字小于 1 分钟

js

2024-12-28

let str = 'aaaa||213434321231231312313223/321312dsa2&&&'
let res = str.replace(/&&&$/, '')
          .split('&&&')
          .map((s) => s.split('||')[1])