diff --git a/spec.html b/spec.html
index 96993d1a5f..42a3a067ee 100644
--- a/spec.html
+++ b/spec.html
@@ -35458,8 +35458,15 @@
Syntax
`\` AtomEscape[?UnicodeMode, ?NamedCaptureGroups]
CharacterClass[?UnicodeMode, ?UnicodeSetsMode]
`(` GroupSpecifier[?UnicodeMode]? Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] `)`
- `(?` RegularExpressionFlags `:` Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] `)`
- `(?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] `)`
+ `(?` RegularExpressionModifiers `:` Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] `)`
+ `(?` RegularExpressionModifiers `-` RegularExpressionModifiers `:` Disjunction[?UnicodeMode, ?UnicodeSetsMode, ?NamedCaptureGroups] `)`
+
+ RegularExpressionModifiers ::
+ [empty]
+ RegularExpressionModifiers RegularExpressionModifier
+
+ RegularExpressionModifier :: one of
+ `i` `m` `s`
SyntaxCharacter :: one of
`^` `$` `\` `.` `*` `+` `?` `(` `)` `[` `]` `{` `}` `|`
@@ -35704,25 +35711,25 @@ Static Semantics: Early Errors
It is a Syntax Error if the MV of the first |DecimalDigits| is strictly greater than the MV of the second |DecimalDigits|.
- Atom :: `(?` RegularExpressionFlags `:` Disjunction `)`
+ Atom :: `(?` RegularExpressionModifiers `:` Disjunction `)`
-
- It is a Syntax Error if the source text matched by |RegularExpressionFlags| contains any code point other than `i`, `m`, or `s`, or if it contains the same code point more than once.
+ It is a Syntax Error if the source text matched by |RegularExpressionModifiers| contains the same code point more than once.
- Atom :: `(?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)`
+ Atom :: `(?` RegularExpressionModifiers `-` RegularExpressionModifiers `:` Disjunction `)`
-
- It is a Syntax Error if the source text matched by the first |RegularExpressionFlags| and the source text matched by the second |RegularExpressionFlags| are both empty.
+ It is a Syntax Error if the source text matched by the first |RegularExpressionModifiers| and the source text matched by the second |RegularExpressionModifiers| are both empty.
-
- It is a Syntax Error if the source text matched by the first |RegularExpressionFlags| contains any code point other than `i`, `m`, or `s`, or if it contains the same code point more than once.
+ It is a Syntax Error if the source text matched by the first |RegularExpressionModifiers| contains the same code point more than once.
-
- It is a Syntax Error if the source text matched by the second |RegularExpressionFlags| contains any code point other than `i`, `m`, or `s`, or if it contains the same code point more than once.
+ It is a Syntax Error if the source text matched by the second |RegularExpressionModifiers| contains the same code point more than once.
-
- It is a Syntax Error if any code point in the source text matched by the first |RegularExpressionFlags| is also contained in the source text matched by the second |RegularExpressionFlags|.
+ It is a Syntax Error if any code point in the source text matched by the first |RegularExpressionModifiers| is also contained in the source text matched by the second |RegularExpressionModifiers|.
AtomEscape :: `k` GroupName
@@ -36905,17 +36912,17 @@
Parentheses of the form `(` |Disjunction| `)` serve both to group the components of the |Disjunction| pattern together and to save the result of the match. The result can be used either in a backreference (`\\` followed by a non-zero decimal number), referenced in a replace String, or returned as part of an array from the regular expression matching Abstract Closure. To inhibit the capturing behaviour of parentheses, use the form `(?:` |Disjunction| `)` instead.
- Atom :: `(?` RegularExpressionFlags `:` Disjunction `)`
+ Atom :: `(?` RegularExpressionModifiers `:` Disjunction `)`
- 1. Let _addModifiers_ be the source text matched by |RegularExpressionFlags|.
+ 1. Let _addModifiers_ be the source text matched by |RegularExpressionModifiers|.
1. Let _removeModifiers_ be the empty String.
1. Let _modifiedRer_ be UpdateModifiers(_rer_, CodePointsToString(_addModifiers_), _removeModifiers_).
1. Return CompileSubpattern of |Disjunction| with arguments _modifiedRer_ and _direction_.
- Atom :: `(?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)`
+ Atom :: `(?` RegularExpressionModifiers `-` RegularExpressionModifiers `:` Disjunction `)`
- 1. Let _addModifiers_ be the source text matched by the first |RegularExpressionFlags|.
- 1. Let _removeModifiers_ be the source text matched by the second |RegularExpressionFlags|.
+ 1. Let _addModifiers_ be the source text matched by the first |RegularExpressionModifiers|.
+ 1. Let _removeModifiers_ be the source text matched by the second |RegularExpressionModifiers|.
1. Let _modifiedRer_ be UpdateModifiers(_rer_, CodePointsToString(_addModifiers_), CodePointsToString(_removeModifiers_)).
1. Return CompileSubpattern of |Disjunction| with arguments _modifiedRer_ and _direction_.
@@ -49689,6 +49696,8 @@ Regular Expressions
+
+
@@ -49852,8 +49861,8 @@ Syntax
`\` [lookahead == `c`]
CharacterClass[~UnicodeMode, ~UnicodeSetsMode]
`(` GroupSpecifier[~UnicodeMode]? Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] `)`
- `(?` RegularExpressionFlags `:` Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] `)`
- `(?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] `)`
+ `(?` RegularExpressionModifiers `:` Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] `)`
+ `(?` RegularExpressionModifiers `-` RegularExpressionModifiers `:` Disjunction[~UnicodeMode, ~UnicodeSetsMode, ?NamedCaptureGroups] `)`
InvalidBracedQuantifier
ExtendedPatternCharacter