regex fort select option

Hello,

I want to use regex to save an element in page like source below and to inject in the next step.

`
My_Adress
My_Adress

`

But the element is not correctly post with code below :

`
.exec(http(“coordonnees_livraison GET”)
.get("/livraison")
.check(regex(""“name=“selectedBillingAddressId” value=”([a-z0-9]+)"""").saveAs(“selectedAddressId”)))
.exec(http(“coordonnees_livraison POST”)
.post("/livraison")
.formParam(“selectedDeliveryAddressId”, “${selectedAddressId}”)
.formParam(“selectedBillingAddressId”, “${selectedAddressId}”)
.exitHereIfFailed

`

Have you an idea ??

I want to use regex to save an element in page

In most cases, that's a very bad idea.
Use a css selector:
http://gatling.io/docs/2.2.2/http/http_check.html?highlight=css#http-check-css

*Stéphane Landelle*
*GatlingCorp CEO*
slandelle@gatling.io

Ok,

So I am using CSS selector like this

.exec(http(“coordonnees_livraison GET”) .get("/livraison") .check(``css(“option[selected=‘selected’]”, “value”) .saveAs(“selectedAddressId”) ````))`

`

Thanks stephane !!