📌  相关文章
📜  javascript regex 命名捕获组 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:33.651000             🧑  作者: Mango

代码示例2
const auth = 'Bearer AUTHORIZATION_TOKEN'
const { groups: { token } } = /Bearer (?[^ $]*)/.exec(auth)
console.log(token) // Prints "AUTHORIZATION_TOKEN"