Need help on regex for correlation purpose in Gatling.

I do have scenario where I need to extract a dynamic value from the post request for correlation purpose and here is what it looks like

Here I am trying to extract the dynamic value which is YTttA from the post request

post(uri3 + “/as/YTttA/resume/as/”)

Here is what my Regex looks like

Regex :- check(regex(as="([^"]+)").saveAS(“SessionID”))

Can some please let me know whether the regex format is good and is there any other way to handle this in Gatling

Can some one please help me out ?

It would help to check the gatling implementation under the hood

then take that regex code in the gatling api that does regex , in a driver program and test it out.


I have no luck doing correlations even after reading the doucmentation I am really looking to learn Gatling tool but not able to understand the concepts how it works ? if some one want to help please provide some sample or example scritps with basic things like parameterization, correlation, error checks, etc.,

In my Gatling script I use the following, there are probably more elegant regex’s to use but I did this in a rush



Gatling I believe uses the same RegExp syntax as Scala/Java, see e.g.
I use e.g. to test my regexp is correct before editing and running my Gatling simulation.

If your string is literally as you have posted there (i.e. “”/as/YTttA/resume/as/") then this regex works .?/as/(.?)/.*