Skip to content

Commit

Permalink
Update regex examples to be more durible
Browse files Browse the repository at this point in the history
Change will match exactly one of options and not contains.

Update example to match a specific type and not just includes text
  • Loading branch information
hborham committed Aug 11, 2022
1 parent fd3c14d commit ed5780e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ Example synchronous message:
"matchers": [
{
"match": "regex",
"regex": "CONTENT_MATCHER|CONTENT_GENERATOR"
"regex": "^(CONTENT_MATCHER|CONTENT_GENERATOR)$"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions testcases/message/body/matches with regex.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"matchers": [
{
"match": "regex",
"regex": "red|blue"
"regex": "^(red|blue)$"
}
]
},
"$.alligator.favouriteColours[1]": {
"matchers": [
{
"match": "regex",
"regex": "red|blue"
"regex": "^(red|blue)$"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion testcases/request/body/matches with regex xml.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"matchers": [
{
"match": "regex",
"regex": "red|blue"
"regex": "^(red|blue)$"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions testcases/request/body/matches with regex.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
"matchers": [
{
"match": "regex",
"regex": "red|blue"
"regex": "^(red|blue)$"
}
]
},
"$.alligator.favouriteColours[1]": {
"matchers": [
{
"match": "regex",
"regex": "red|blue"
"regex": "^(red|blue)$"
}
]
}
Expand Down

0 comments on commit ed5780e

Please sign in to comment.