0
{  
  "response":{  
    "statusCode":"00",
    "status":"success",
            "responseData":{  
                     "status":1,
                     "themeID":27,
                     "themeName":"ThemeName25",
                     "templateId":22
                           }
             }
}

Here i need to retrieve the value of templateId, themeName using regular expression extractor only not by jmeter plugins like json path extractor. Can anyone having for this solution??

2 Answers 2

0

Use the regexen

/"themeName":"([^"]+)"/
/"templateId":([0-9]+)/

to capture the result.

This goes by the usual caveat that it is strongly discouraged to use regex patterns as parser substitutes

One assumption is that values for templateId are structly numeric.

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

Comments

0

To Capture templateId: templateId":(\d+)
To Capture themeName: themeName":"(.+?)"

The special characters above are:
( and ) - these enclose the portion of the match string to be returned
. - match any character
+ - one or more times
? - stop when first match succeeds
\d - for any digit

Comments

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.