📅  最后修改于: 2022-03-11 15:02:33.651000             🧑  作者: Mango
const auth = 'Bearer AUTHORIZATION_TOKEN'
const { groups: { token } } = /Bearer (?[^ $]*)/.exec(auth)
console.log(token) // Prints "AUTHORIZATION_TOKEN"