What should be the values ​​for the regular expression extent

If I want to extract a value for an access token, then what values ​​should be lower in the Regular Expression Instance section

{"access_token":"YaTtnlYnqSuXIZ9K1BouYC3jgxjVQV6qpAyCnkv6","token_type":"Bearer","expires_in":28800,"refresh_token":"FkpJDh8c6x4xOp0o3GPb28kfSLVTPCZNCCiSSUZ4"},

Reference name :?
Regular expression:?
Template:?
Match No. :?
Default value :?

+4
source share
2 answers

Your regex will be "access_token":"(\w+)"to extract the value for the access token. See here for matching expression.

Reference name: Any_Variable_like_i.e_Var1
Regular Expression: "access_token":"(\w+)"
Template: $1$
Match No: 1
DefaultValue: No need to put any value there.

You can set your regular expression extractor as follows: enter image description here

+3
source

Better Use JSON Extractor

$ .. access_token for access_token

$.. refresh_token refresh_token

:

enter image description here

+2

Source: https://habr.com/ru/post/1676057/


All Articles