1

I have the following JSON response to my request in JMeter:

{
"response":
 {"info": 
{"success":"1",
"ticket":"http://43.252.88.109:4006/BracketICT/?t=aZCcbzidJJKfFgrkk1RYPH0zHTl+MtTuoGeiUw0hEw48nLZUoPrfntO29VV2daEiR3cPbu25/Xf2a3Q1UMZs1tG2BeMKvA0tCrq9+e3dTrWZ0Z1yTrWlkWEbAwmvRwAfMdoX+vDfKd30hW9CBVpyUsA==&uniqueID=dGdck61pZFhGwMJr0cAHzNruDU6ItF1s&dev=1696661"}}}

I want to break my url into 3 parts extract and themin 3 different regex variables: The value folllowing http://43.252.88.109:4006/BracketICT/? i.e.

t=aZCcbzidJJKfFgrkk1RYPH0zHTl+MtTuoGeiUw0hEw48nLZUoPrfntO29VV2daEiR3cPbu25/Xf2a3Q1UMZs1tG2BeMKvA0tCrq9+e3dTrWZ0Z1yTrWlkWEbAwmvRwAfMdoX+vDfKd30hW9CBVpyUsA==

then the value following uniqueID i.e

=dGdck61pZFhGwMJr0cAHzNruDU6ItF1s

and the value in dev

How this can be done using Regular expression extractor?

1 Answer 1

2

You can use regular expression in 3 separate extractors:

t=([^&]+)
uniqueID=([^&]+)
dev=([^"]+)

If you want also the = sign to be included move it inside brackets

You are searching for all characters different than & (or "), which marks the end of the string

Sign up to request clarification or add additional context in comments.

5 Comments

Could you please explain me what does ([^&]+) and ([^"]+) signify? I am not a pro in regex extractors. all i know is (.+?) sign .
@Radhika you are searching for all characters different than & (or "), which marks the end of the string
thanks and in order to include = sign do we write like this? t(=[^&]+)
@Radhika yes, the brackets holds the value you want
Hi I need to extract 7 and the value a55a865f-31a9-41bd-929c-9563f2808969 from the expression 7@@a55a865f-31a9-41bd-929c-9563f2808969@@Running TestCases@@ where both the values are dynamic. How can it be done?

Your Answer

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.