15 years ago
Help with Assertion Contains regular expression
This is part of my response and I want to match that the content length contains a number. so matching on contentLength="108169" should be sufficient.
<data contentType="text/plain" contentLength="108169">
I was using regexpal (http://regexpal.com/) to test my regular expression and this expression matched the whole line
.*contentLength=\"\d+\".*
This did not work in my assertion. I searched the forum and I found this expression: (?s).*(\d+).* which worked but I also want to match on the contentLength= part.
Thank you,
- Steve
<data contentType="text/plain" contentLength="108169">
I was using regexpal (http://regexpal.com/) to test my regular expression and this expression matched the whole line
.*contentLength=\"\d+\".*
This did not work in my assertion. I searched the forum and I found this expression: (?s).*(\d+).* which worked but I also want to match on the contentLength= part.
Thank you,
- Steve