share/tests/draft3/optional/format/ecmascript-regex.json
raw| 1 | [ |
| 2 | { |
| 3 | "description": "ECMA 262 regex dialect recognition", |
| 4 | "schema": { "format": "regex" }, |
| 5 | "tests": [ |
| 6 | { |
| 7 | "description": "[^] is a valid regex", |
| 8 | "data": "[^]", |
| 9 | "valid": true |
| 10 | }, |
| 11 | { |
| 12 | "description": "ECMA 262 supports lookbehind since ES2018", |
| 13 | "data": "(?<=foo)bar", |
| 14 | "valid": true |
| 15 | }, |
| 16 | { |
| 17 | "description": "ECMA 262 does not support Python-style named groups", |
| 18 | "data": "(?P<name>x)", |
| 19 | "valid": false |
| 20 | } |
| 21 | ] |
| 22 | } |
| 23 | ] |