1const auth = 'Bearer AUTHORIZATION_TOKEN'
2const { groups: { token } } = /Bearer (?<token>[^ $]*)/.exec(auth)
3console.log(token) // Prints "AUTHORIZATION_TOKEN"
1 const auth = 'Bearer AUTHORIZATION_TOKEN'
2 const { groups: { token } } = /Bearer (?<token>[^ $]*)/.exec(auth)
3 console.log(token) // "Prints AUTHORIZATION_TOKEN"
4