Hi I'm trying to use json unit regex and i have tw...
# help
s
Hi I'm trying to use json unit regex and i have two urls that i want to match - something along signin.qa.abc.com and the other one with signin.dev.abc.com I wrote
${json-unit.regex}^(<https://signin>.*.<http://abc.com|abc.com>)
as the pattern but it does not match the above two urls. is there any guide to follow for these regex?
other things i tried -
<https://signin>.${json-unit.regex}(qa)|(dev).<http://abc.com|abc.com>
o
Hi. In which field do you perform the match? Is it the JSON body or something else?
s
@Oleg Nenashev I want to match the json responses using assertThatJson
I am putting the json-unit.regex in the json file - which would be used and loaded as expected response
On another note - how do I put json-unit.regex in the middle of a string? is that possible?
o
No, I don't think so
s
for anyone having the same question - what worked for me was
"URL": "${json-unit.regex}^<https://signin>\\.(qa|dev)\\.abc\\.com"
I had to escape the dots