Skip to content

Commit

Permalink
Update regular_expressions.md (#1115)
Browse files Browse the repository at this point in the history
Identify the schema for the last example.
Identify the compliant and noncompliant data.
Make indentation consistent with the example above it.
  • Loading branch information
Vaent authored Jan 7, 2025
1 parent 0caf296 commit 8f2c85f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions pages/understanding-json-schema/reference/regular_expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,17 @@ The following example checks that the string starts with `{{` and ends with `}}`
and that it also allows multiline strings.

```json
{
"type": "string",
"pattern": "^\\{\\{(.|[\\r\\n])*\\}\\}$",
}
// props { "isSchema": true }
{
"type": "string",
"pattern": "^\\{\\{(.|[\\r\\n])*\\}\\}$",
}
```
```json
"{{ foo\nbar }}"
// props { "indent": true, "valid": true }
"{{ foo\nbar }}"
```
```json
"{ foo }"
// props { "indent": true, "valid": false }
"{ foo }"
```

0 comments on commit 8f2c85f

Please sign in to comment.