Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fslev committed May 6, 2022
1 parent 82c14da commit 7618a6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ JSONCompare by default matches JSON fields and values using regular expressions.
If you have special regex characters inside either expected values or expected fields, but you literally want to match them, then you can quote them:

```javascript
String expected = "{\"a\":\"\\\\Q\\\\d+\\\\E\"}";
String actual = "{\"a\":\"\\\\d+\"}";
String expected = "{\"a\":\"\\Qd+\\E\"}";
String actual = "{\"a\":\"d+\"}";
JSONCompare.assertEquals(expected, actual);
```

Expand Down

0 comments on commit 7618a6b

Please sign in to comment.