Regular expression shows null

Hi Team,

I’m new to the regular expression. I tried to extract a value from the HTML response, But every time it shows null.

The extraction code

From the response

If I use resURL[1] it throws an error.

Guide me how to extract the value ‘89’, from the response.

Hi @Gerard, the result of an http.get is an object not just the string value of the response body. To get the response body you need to access the body attribute of the response object - in your case searchRes.body.

You actually do this in the second line of the check, the one that starts with Verify.

Hi, @mstoykov thanks for the quick reply. The regex works for me, but it finds only the first match. There are multiple matches available for the mentioned regex. How to handle it.