# regex'ing from soap response

**URL:** <https://community.gatling.io/t/regexing-from-soap-response/1615>\
**Category:** Gatling (Open-Source)\
**Created:** [October 30, 2014, 9:39pm UTC](https://community.gatling.io/t/regexing-from-soap-response/1615 "2014-10-30T21:39:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fugmag](https://avatars.discourse-cdn.com/v4/letter/f/d78d45/32.png) [@fugmag](https://community.gatling.io/u/fugmag)\
**Post date:** [October 30, 2014, 9:39pm UTC](https://community.gatling.io/t/regexing-from-soap-response/1615/1 "2014-10-30T21:39:21Z")

</div>

Basically, how do I save the ConversionRateResult in a local variable in Gatling using regex?

`

\<soap:Envelope xmlns:soap=“[http://schemas.xmlsoap.org/soap/envelope/](http://schemas.xmlsoap.org/soap/envelope/)” xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)” xmlns:xsd=“[http://www.w3.org/2001/XMLSchema](http://www.w3.org/2001/XMLSchema)”\>  
soap:Body  
  
0.1492  
  
\</soap:Body\>  
\</soap:Envelope\>

`

To accomplish the same With JSON I would say something like:

`.check(jsonPath("$.profile.memberships[0].scanNumber").saveAs("scanNr")))`

If I where to look for a “scannumber” in the JSON body.

But how to do it with soap response?

Magnus

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [October 31, 2014, 9:08am UTC](https://community.gatling.io/t/regexing-from-soap-response/1615/2 "2014-10-31T09:08:57Z")

</div>

JsonPath is for JSON, not XML.

You might want to have a look at XPath.
