Skip to content

Commit

Permalink
Clarified statusPattern readme section (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
yenba authored Dec 23, 2021
1 parent b3eb2b1 commit 895b703
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,6 @@ could specify the following pattern:
}
```

<br>

However using Regular Expressions much more complex patterns are possible. Let's assume your http enabled device responds
with the following json string as body, where one property has an random value an the other indicates the status of the
switch:
Expand All @@ -436,6 +434,16 @@ Then you could use the following pattern:
"statusPattern": "{\n \"perRequestRandomValue\": [0-9]+,\n \"switchState\": true\n}"
}
```
**Note:** The `statusPattern` must be placed on the same level as the `statusUrl` property, not inside the `statusUrl` object. See below for example.

```json
{
"statusUrl": {
},
"statusPattern": "....",
}
```

More on how to build regex patterns: https://www.w3schools.com/jsref/jsref_obj_regexp.asp

## Notification Server
Expand Down

0 comments on commit 895b703

Please sign in to comment.