pm.test("Is a substring in string", () => {
pm.expect(pm.response.json().key).to.match(/regex/);
});
And a tip from my side. To not waste time for awaiting answers, I’m searching for it (cuz it’s certain, most of them already were answered). The key is to make a point questions (which is actually good practice in QA business, isn’t it?).
It was less than 5 min to find:
Google: chai how to assert substring of string Google answers