Regex match multiple values


I have some hidden fields and use regex to match:

.regex(""“type=“hidden” name=”([\w=/.\d_%±.$])" id="([\w=/.\d_%±.$])hdnGroupID" value="([\w=/.\d_%±.]*)""").findAll.saveAs(“hdnGroupID”)

Tried this on site, it have 2 matches:

  1. [27-90] ctl00$PlaceHolderMain$dtlUsers$ctl05$rptGroups$ctl00$hdnGroupID
  2. [96-149] ctl00_PlaceHolderMain_dtlUsers_ctl05_rptGroups_ctl00_
  3. [168-169] 1
    MATCH 2
  4. [201-264] ctl00$PlaceHolderMain$dtlUsers$ctl05$rptGroups$ctl01$hdnGroupID
  5. [270-323] ctl00_PlaceHolderMain_dtlUsers_ctl05_rptGroups_ctl01_
  6. [342-343] 2

In Gatling 2.0.0-SNAPSHOT, for each MATCH, I’d like to get 2 values (name and value). For example, get name “ctl00$PlaceHolderMain$dtlUsers$ctl05$rptGroups$ctl00$hdnGroupID” and value 1 in MATCH 1.
I tried to use
var hdnGroupID = session(“hdnGroupID”).as[Seq[String]]

But it just return “ctl00$PlaceHolderMain$dtlUsers$ctl05$rptGroups$ctl00$hdnGroupID

How can I get both name and value (how to declare Seq for this case)?

Thanks in advance.

Yes you can, see my response to the previous thread.