In this post, we will see how to resolve How to match content in json response in Postman?
Question:
Been trying to figure how to get regex working in Postman, but can’t seem to zone in on what I’m doing wrong.Sample:
Tried pm.expect(counter.metadata.email_subject).contains(“Password”); and also pm.expect(counter.metadata.email_subject).to.match(/Password/); but always get an error.
.to.match()
function, e.g. this should passIf you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com
Leave a Review