2

I have the below response from the API:

{"info":{"message":"success","details":{}},"data":"https://127.0.0.1:80/view-report?https://routethis.creativeadvtech.ml/api/v1/report/get_subscriber_report?verification_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ2aWV3X3JlcG9ydF90b2tlbiIsImlhdCI6MTY0NDQyNzEzNSwibmJmIjoxNjQ0NDI3MTM1LCJqdGkiOiJhOTFlZWY0Ny01ZWY1LTQ3YWEtYTc0Ny1mYTNhOWM4MWRmNjMiLCJ0eXBlIjoiYWNjZXNzIiwiZnJlc2giOmZhbHNlLCJyZXBvcnRfaWQiOiI1YzQxYzU4MC04OWNjLTExZWMtOWM4Zi1hNjkzNGQ4NWQxMDkiLCJjdXN0b21lcl9pZCI6ImY2MGIyMjc0LWQ2MTAtNDBkMS1iNjJjLTc5NTEwOWZjMjk0ZiJ9.ica2CS-cT3RxbNPhMUn1Tw_HGtODmgAzS_JpjoS22NU"}

Question: How to extract the Verification_token value only notice that the whole data response is a full value attached to each other?

enter image description here

IAmMilinPatel
7,7667 gold badges44 silver badges68 bronze badges
asked Feb 9, 2022 at 17:32

1 Answer 1

2

Your regular expression extracts the whole contents of data attribute, why would you expect it to return the partial value.

If you need the token only - you need to amend your regular expression to something like:

{"info":{"message":"success","details":{}},"data":".*verification_token=(.+?)"}

Demo:

enter image description here

More information:

answered Feb 10, 2022 at 4:56
1
  • Thank you soo much , it works :D Commented Feb 10, 2022 at 9:30

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.