📅  最后修改于: 2022-03-11 15:02:06.555000             🧑  作者: Mango
const str = "hello,how,are,you,today?"
const pieces = str.split(/[\s,]+/)
const last = pieces[pieces.length - 1]
console.log({last})
Run code snippet