Test regex

I do a search on google and I would realize a regex on the page to recover the time to research the top of the page, and Gateling always returns me no found

Environ 4 820 000 résultats (0,22 secondes) 

And my Scala’s code:

import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Predef._
import com.excilys.ebi.gatling.jdbc.Predef._
import com.excilys.ebi.gatling.http.Headers.Names._
import akka.util.duration._
import bootstrap._
import assertions._
class TestGoogle extends Simulation {
val httpConf = httpConfig
.acceptEncodingHeader(“gzip, deflate”)
.userAgentHeader(“Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:20.0) Gecko/20100101 Firefox/20.0”)
.responseInfoExtractor((response:Response) => {
println("Message from response " )

val headers_1 = Map(
“Accept” → “”“text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8"”"

val scn = scenario(“Scenario Name”)
.queryParam(""“q”"", “”“twitter”"")


PS: sorry for the double post.


is not what being returned in the HTTP response but
(no double quotes).
Then, \w is for matching only word characters (alphanumeric), but the expected result also contains other characters.

The proper regex would be


I agree with Stephane, but, also, a different possible approach, if you are not familiar with regexes, is to use the css selectors.
For exemple, in your case,




with :

It’s working, thank a lot