gatling 3.0.x to have web socket check from the main HTTP flow (like 2.3.x)

I am trying to upgrade gatling from 2.3.x to 3.0.x and I am facing difficulties in implementing the web socket check.
I have one web socket request which would receive multiple web socket responses(say 3 for now) so, my question is if I could put my check on the 2nd response ?

Can we have ws-request with multiple ws-responses check or it has to be in request-response manner.

Like with gatling 2.3.x we had exec(ws("Set Check").check(myCheck)) where we didn’t need to compulsorily fire a websocket request to get the response. How do I achieve the similar behavior with gatling 3.0.x


I somehow got the solution.
So, if we have 1 request and 3 responses and the reqex that we are looking for is in response 2, we have to first put the matching criteria which would filter out the ws response for us and then, the check criteria which would correctly get us the result.

For example:

ws.checkTextMessage("my customizable checkName")
    .matching(regex(".*login successful.*")))
    .check(regex(".*login successful.*"))

If we don’t put the matching criteria, the check would be executed on the first response that we get for the ws request. But, with this approach we can work with async ws model also, where we don’t have the request-response ws flow.

Thank you for this hint about matching!
This same problem with WS checks was preventing me from migrating to Gatling 3.