Skip to content

Commit cdebed9

Browse files
authored
Merge pull request #1297 from handrews/regex-unanchored
Note non-anchoring of regexes in the regex section.
2 parents 8d86c85 + 8300dbd commit cdebed9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

jsonschema-core.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,11 @@
573573
These regular expressions SHOULD be valid according to the regular expression
574574
dialect described in <xref target="ecma262">ECMA-262, section 21.2.1</xref>.
575575
</t>
576+
<t>
577+
Unless otherwise specified by a keyword, regular expressions MUST NOT be
578+
considered to be implicitly anchored at either end. All regular expression
579+
keywords in this specification and its companion documents are un-anchored.
580+
</t>
576581
<t>
577582
Regular expressions SHOULD be built with the "u" flag (or equivalent) to provide
578583
Unicode support, or processed in such a way which provides Unicode support as
@@ -2449,7 +2454,8 @@
24492454
Validation succeeds if, for each instance name that matches any
24502455
regular expressions that appear as a property name in this keyword's value,
24512456
the child instance for that name successfully validates against each
2452-
schema that corresponds to a matching regular expression.
2457+
schema that corresponds to a matching regular expression. Recall: regular
2458+
expressions are not implicitly anchored.
24532459
</t>
24542460
<t>
24552461
The annotation result of this keyword is the set of instance

0 commit comments

Comments
 (0)