From ee4cae02fbb80a47b503ecd2e7efee047a1f102b Mon Sep 17 00:00:00 2001 From: hborham Date: Thu, 11 Aug 2022 10:26:33 -0700 Subject: [PATCH] Update regex examples to be more durable Change will match exactly one of options and not contains. Update example to match a specific type and not just includes text --- README.md | 2 +- testcases/message/body/matches with regex.json | 4 ++-- testcases/request/body/matches with regex xml.json | 2 +- testcases/request/body/matches with regex.json | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7d4ae58..9eef437 100644 --- a/README.md +++ b/README.md @@ -448,7 +448,7 @@ Example synchronous message: "matchers": [ { "match": "regex", - "regex": "CONTENT_MATCHER|CONTENT_GENERATOR" + "regex": "^(CONTENT_MATCHER|CONTENT_GENERATOR)$" } ] } diff --git a/testcases/message/body/matches with regex.json b/testcases/message/body/matches with regex.json index 23a611d..a40cf05 100644 --- a/testcases/message/body/matches with regex.json +++ b/testcases/message/body/matches with regex.json @@ -30,7 +30,7 @@ "matchers": [ { "match": "regex", - "regex": "red|blue" + "regex": "^(red|blue)$" } ] }, @@ -38,7 +38,7 @@ "matchers": [ { "match": "regex", - "regex": "red|blue" + "regex": "^(red|blue)$" } ] } diff --git a/testcases/request/body/matches with regex xml.json b/testcases/request/body/matches with regex xml.json index c7fa8c2..458a931 100644 --- a/testcases/request/body/matches with regex xml.json +++ b/testcases/request/body/matches with regex xml.json @@ -20,7 +20,7 @@ "matchers": [ { "match": "regex", - "regex": "red|blue" + "regex": "^(red|blue)$" } ] } diff --git a/testcases/request/body/matches with regex.json b/testcases/request/body/matches with regex.json index e9f0ded..3f7ce80 100644 --- a/testcases/request/body/matches with regex.json +++ b/testcases/request/body/matches with regex.json @@ -20,7 +20,7 @@ "matchers": [ { "match": "regex", - "regex": "red|blue" + "regex": "^(red|blue)$" } ] }, @@ -28,7 +28,7 @@ "matchers": [ { "match": "regex", - "regex": "red|blue" + "regex": "^(red|blue)$" } ] }