如何从javascript中的url中提取多个令牌?

时间:2018-05-16 11:25:46

标签: javascript regex url token

http://staging.example.com/invitation/accept?invitation_token= _86uiB3VskV5VATReut 9和; study_token = 9d9ba0207a35971490aee5a11a40cc526b73137d047f1a8506a2b65e9e349706268cc7ab0ef6130a66913d01628b15f646e947d6b5dc4d874d675b4194ae6788

如何从上面的url中提取invitation_token和study_token? 尝试使用正则表达式,但无法提取它。

1 个答案:

答案 0 :(得分:2)

您可以登录API URL并使用URL.searchParams



[WEbagent_insall_Log][1] - Log during web agent installation
[Session-Log][2] - Log at the server openam side 
[OpenaM_access.csv_log][3] log for open am side about the access
[WEbagent Installation][1] screen when I try to install webagent

  [1]: https://i.stack.imgur.com/HmCFZ.jpg
  [2]: https://i.stack.imgur.com/KX1Tb.jpg
  [3]: https://i.stack.imgur.com/jQYUX.jpg