substring("string").count only returns one or zero

Hi all -

I having an issue where substring(“string”).count only returns a one or a zero when checked with the .is method. I’m sure this is caused by my newness to Scala and Gatling, but I just can’t figure out what I’m doing wrong. According to the docs at: it seems like substring should return more than one result if the substring exists multiple times in the body. However, when I use the .regex method, I get the correct number of responses.

Here is my code:

import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import util.Random

class GetOne extends Simulation {

/* headers and credentials omitted */

val scn = scenario(“populate”)
.repeat(1) {
.exec(http(“request - login”)
.exec(http(“get offers”)

This gives me this output:

---- Errors --------------------------------------------------------------------

substring(save_for_later_offer_id), but actually f 1 (100.0%)

ound 1

Indeed a bug, thanks for reporting!