From c9038e8c4a447e5a42b279e27b0953b07a9e9ae0 Mon Sep 17 00:00:00 2001 From: "Henry H. Andrews" Date: Sun, 18 Sep 2022 19:22:16 -0700 Subject: [PATCH 1/2] Note non-anchoring of regexes in the regex section. --- jsonschema-core.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 0181a388..888c226a 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -563,6 +563,11 @@ These regular expressions SHOULD be valid according to the regular expression dialect described in ECMA-262, section 21.2.1. + + Unless otherwise specified by a keyword, regular expressions MUST NOT be + considered to be implicitly anchored at either end. All regular expression + keywords in this specification and its companion documents are un-anchored. + Regular expressions SHOULD be built with the "u" flag (or equivalent) to provide Unicode support, or processed in such a way which provides Unicode support as From 8300dbd4779091ffbe900b0fb990306554e62fe3 Mon Sep 17 00:00:00 2001 From: "Henry H. Andrews" Date: Fri, 23 Sep 2022 18:15:08 -0700 Subject: [PATCH 2/2] pattern regex anchor text to patternProperties Copied the text about regexes not being anchored from "pattern" to the analogous location in "patternProperties". --- jsonschema-core.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index 888c226a..1a3f3493 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -2446,7 +2446,8 @@ Validation succeeds if, for each instance name that matches any regular expressions that appear as a property name in this keyword's value, the child instance for that name successfully validates against each - schema that corresponds to a matching regular expression. + schema that corresponds to a matching regular expression. Recall: regular + expressions are not implicitly anchored. The annotation result of this keyword is the set of instance