I am capturing request in stubby4j like this
- request:
method: POST
url: /someUrl
post: ".*(amit).*"
It works fine if I use single line in request body. E.g. User name is amit gupta. But it fails if I use multiline text as
User name is amit gupta
secondline
How can I match some part of request body?
Judging by the documentation, you just can use
The
[\s\S]construct matches any character that is either whitespace (\s) or non-whitespace (\S). Note that the parentheses aroundamitonly make sense if you use the backreference to it later, thus, I'd remove these brackets.