I need to extract value from the response body text and need to add that value for another request. I need to write a regular expression to capture the below-mentioned value.
<id>45893943</id>
I need to extract value from the response body text and need to add that value for another request. I need to write a regular expression to capture the below-mentioned value.
<id>45893943</id>
If you're looking for a regular expression - it would be something like <id>(\d+)</id>
where:
d
- matches any number+
- repetitionIt might be easier for you to consider Boundary Extractor as it's configuration is more simple and it acts much faster, just provide <id>
as the left boundary and </id>
as the right boundary and JMeter will extract everything between the boundaries:
And last but not the least, using regular expressions for parsing HTML or XML is not the best idea, you might want to use CSS Selector Extractor or XPath Extractor instead, however we need to see the full response in order to be able to come up with the best solution