Name Description Size
add-dotAll-does-not-affect-dotAll-property.js --- author: Ron Buckton description: > Adding dotAll (`s`) modifier does not affect RegExp instance `dotAll` property. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2244
add-dotAll-does-not-affect-ignoreCase-flag.js --- author: Ron Buckton description: > Adding dotAll (`s`) modifier in group should not affect ignoreCase (`i`) flag. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 3474
add-dotAll-does-not-affect-multiline-flag.js --- author: Ron Buckton description: > Adding dotAll (`s`) modifier in group should not affect multiline (`m`) flag. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 3023
add-dotAll.js --- author: Ron Buckton description: > dotAll (`s`) modifier can be added via `(?s:)` or `(?s-:)`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 7976
add-ignoreCase-affects-backreferences.js --- author: Ron Buckton description: > Adding ignoreCase (`i`) modifier in group affects backreferences in group. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2901
add-ignoreCase-affects-characterClasses.js --- author: Ron Buckton description: > Adding ignoreCase (`i`) modifier in group affects character classes in group. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 3245
add-ignoreCase-affects-characterEscapes.js --- author: Ron Buckton description: > Adding ignoreCase (`i`) modifier in group affects character escapes in group. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 3100
add-ignoreCase-affects-slash-lower-b.js --- author: Ron Buckton description: > Adding ignoreCase (`i`) modifier affects matching for `\b`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. GetWordCharacters ( modifiers ) The abstract operation GetWordCharacters takes argument modifiers (a Modifiers Record) and returns a CharSet. It performs the following steps when called: 1. Let wordCharacters be the mathematical set that is the union of all sixty-three characters in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" (letters, numbers, and U+005F (LOW LINE) in the Unicode Basic Latin block) and all characters c for which c is not in that set but Canonicalize(c, modifiers) is. 2. Return wordCharacters. esid: sec-compileatom features: [regexp-modifiers] --- 4023
add-ignoreCase-affects-slash-lower-p.js --- author: Ron Buckton description: > Adding ignoreCase (`i`) modifier affects matching for `\p{}`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. GetWordCharacters ( modifiers ) The abstract operation GetWordCharacters takes argument modifiers (a Modifiers Record) and returns a CharSet. It performs the following steps when called: 1. Let wordCharacters be the mathematical set that is the union of all sixty-three characters in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" (letters, numbers, and U+005F (LOW LINE) in the Unicode Basic Latin block) and all characters c for which c is not in that set but Canonicalize(c, modifiers) is. 2. Return wordCharacters. esid: sec-compileatom features: [regexp-modifiers] --- 3380
add-ignoreCase-affects-slash-lower-w.js --- author: Ron Buckton description: > Adding ignoreCase (`i`) modifier affects matching for `\w`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. GetWordCharacters ( modifiers ) The abstract operation GetWordCharacters takes argument modifiers (a Modifiers Record) and returns a CharSet. It performs the following steps when called: 1. Let wordCharacters be the mathematical set that is the union of all sixty-three characters in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" (letters, numbers, and U+005F (LOW LINE) in the Unicode Basic Latin block) and all characters c for which c is not in that set but Canonicalize(c, modifiers) is. 2. Return wordCharacters. esid: sec-compileatom features: [regexp-modifiers] --- 3903
add-ignoreCase-affects-slash-upper-b.js --- author: Ron Buckton description: > Adding ignoreCase (`i`) modifier affects matching for `\B`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. GetWordCharacters ( modifiers ) The abstract operation GetWordCharacters takes argument modifiers (a Modifiers Record) and returns a CharSet. It performs the following steps when called: 1. Let wordCharacters be the mathematical set that is the union of all sixty-three characters in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" (letters, numbers, and U+005F (LOW LINE) in the Unicode Basic Latin block) and all characters c for which c is not in that set but Canonicalize(c, modifiers) is. 2. Return wordCharacters. esid: sec-compileatom features: [regexp-modifiers] --- 3200
add-ignoreCase-affects-slash-upper-p.js --- author: Ron Buckton description: > Adding ignoreCase (`i`) modifier affects matching for `\P{}`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. GetWordCharacters ( modifiers ) The abstract operation GetWordCharacters takes argument modifiers (a Modifiers Record) and returns a CharSet. It performs the following steps when called: 1. Let wordCharacters be the mathematical set that is the union of all sixty-three characters in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" (letters, numbers, and U+005F (LOW LINE) in the Unicode Basic Latin block) and all characters c for which c is not in that set but Canonicalize(c, modifiers) is. 2. Return wordCharacters. esid: sec-compileatom features: [regexp-modifiers] --- 3478
add-ignoreCase-affects-slash-upper-w.js --- author: Ron Buckton description: > Adding ignoreCase (`i`) modifier affects matching for `\W`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. GetWordCharacters ( modifiers ) The abstract operation GetWordCharacters takes argument modifiers (a Modifiers Record) and returns a CharSet. It performs the following steps when called: 1. Let wordCharacters be the mathematical set that is the union of all sixty-three characters in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" (letters, numbers, and U+005F (LOW LINE) in the Unicode Basic Latin block) and all characters c for which c is not in that set but Canonicalize(c, modifiers) is. 2. Return wordCharacters. esid: sec-compileatom features: [regexp-modifiers] --- 3158
add-ignoreCase-does-not-affect-dotAll-flag.js --- author: Ron Buckton description: > Adding ignoreCase (`i`) modifier in group should not affect dotAll (`s`) flag. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 3522
add-ignoreCase-does-not-affect-ignoreCase-property.js --- author: Ron Buckton description: > Adding ignoreCase (`i`) modifier does not affect RegExp instance `ignoreCase` property. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2785
add-ignoreCase-does-not-affect-multiline-flag.js --- author: Ron Buckton description: > Adding ignoreCase (`i`) modifier in group should not affect multiline (`m`) flag. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 3525
add-ignoreCase.js --- author: Ron Buckton description: > ignoreCase (`i`) modifier can be added via `(?i:)` or `(?i-:)`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2194
add-multiline-does-not-affect-dotAll-flag.js --- author: Ron Buckton description: > Adding multiline (`m`) modifier in group should not affect dotAll (`s`) flag. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 3023
add-multiline-does-not-affect-ignoreCase-flag.js --- author: Ron Buckton description: > Adding multiline (`m`) modifier in group should not affect ignoreCase (`i`) flag. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 3513
add-multiline-does-not-affect-multiline-property.js --- author: Ron Buckton description: > Adding multiline (`m`) modifier does not affect RegExp instance `multiline` property. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2274
add-multiline.js --- author: Ron Buckton description: > multiline (`m`) modifier can be added via `(?m:)` or `(?m-:)`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2243
add-remove-modifiers.js --- author: Ron Buckton description: > Modifiers can be both added and removed via `(?ims-ims:)`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2208
browser.js 0
changing-dotAll-flag-does-not-affect-dotAll-modifier.js --- author: Ron Buckton description: > New dotAll (`s`) flag from RegExp constructor does not affect dotAll modifier in group. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 5606
changing-ignoreCase-flag-does-not-affect-ignoreCase-modifier.js --- author: Ron Buckton description: > New ignoreCase (`i`) flag from RegExp constructor does not affect ignoreCase modifier in group. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 3009
changing-multiline-flag-does-not-affect-multiline-modifier.js --- author: Ron Buckton description: > New multiline (`m`) flag from RegExp constructor does not affect multiline modifier in group. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2756
nested-add-remove-modifiers.js --- author: Ron Buckton description: > Modifiers can be nested. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2182
nesting-add-dotAll-within-remove-dotAll.js --- author: Ron Buckton description: > Can add multiline (`m`) modifier for group nested within a group that removes multiline modifier. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 4947
nesting-add-ignoreCase-within-remove-ignoreCase.js --- author: Ron Buckton description: > Can add ignoreCase (`i`) modifier for group nested within a group that removes ignoreCase modifier. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2228
nesting-add-multiline-within-remove-multiline.js --- author: Ron Buckton description: > Can add multiline (`m`) modifier for group nested within a group that removes multiline modifier. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2413
nesting-remove-dotAll-within-add-dotAll.js --- author: Ron Buckton description: > Can remove multiline (`m`) modifier for group nested within a group that adds multiline modifier. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 4913
nesting-remove-ignoreCase-within-add-ignoreCase.js --- author: Ron Buckton description: > Can remove ignoreCase (`i`) modifier for group nested within a group that adds ignoreCase modifier. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2228
nesting-remove-multiline-within-add-multiline.js --- author: Ron Buckton description: > Can remove multiline (`m`) modifier for group nested within a group that adds multiline modifier. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2451
remove-dotAll-does-not-affect-dotAll-property.js --- author: Ron Buckton description: > Removing dotAll (`s`) modifier does not affect RegExp instance `dotAll` property. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2169
remove-dotAll-does-not-affect-ignoreCase-flag.js --- author: Ron Buckton description: > Removing dotAll (`s`) modifier in group should not affect ignoreCase (`i`) flag. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2568
remove-dotAll-does-not-affect-multiline-flag.js --- author: Ron Buckton description: > Removing dotAll (`s`) modifier in group should not affect multiline (`m`) flag. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2593
remove-dotAll.js --- author: Ron Buckton description: > dotAll (`s`) modifier can be added via `(?s:)` or `(?s-:)`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 4983
remove-ignoreCase-affects-backreferences.js --- author: Ron Buckton description: > Removing ignoreCase (`i`) modifier in group affects backreferences in group. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2301
remove-ignoreCase-affects-characterClasses.js --- author: Ron Buckton description: > Removing ignoreCase (`i`) modifier in group affects character classes in group. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2798
remove-ignoreCase-affects-characterEscapes.js --- author: Ron Buckton description: > Removing ignoreCase (`i`) modifier in group affects character escapes in group. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2490
remove-ignoreCase-affects-slash-lower-b.js --- author: Ron Buckton description: > Removing ignoreCase (`i`) modifier affects matching for `\b`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. GetWordCharacters ( modifiers ) The abstract operation GetWordCharacters takes argument modifiers (a Modifiers Record) and returns a CharSet. It performs the following steps when called: 1. Let wordCharacters be the mathematical set that is the union of all sixty-three characters in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" (letters, numbers, and U+005F (LOW LINE) in the Unicode Basic Latin block) and all characters c for which c is not in that set but Canonicalize(c, modifiers) is. 2. Return wordCharacters. esid: sec-compileatom features: [regexp-modifiers] --- 3030
remove-ignoreCase-affects-slash-lower-p.js --- author: Ron Buckton description: > Removing ignoreCase (`i`) modifier affects matching for `\p{}`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. GetWordCharacters ( modifiers ) The abstract operation GetWordCharacters takes argument modifiers (a Modifiers Record) and returns a CharSet. It performs the following steps when called: 1. Let wordCharacters be the mathematical set that is the union of all sixty-three characters in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" (letters, numbers, and U+005F (LOW LINE) in the Unicode Basic Latin block) and all characters c for which c is not in that set but Canonicalize(c, modifiers) is. 2. Return wordCharacters. esid: sec-compileatom features: [regexp-modifiers] --- 3110
remove-ignoreCase-affects-slash-lower-w.js --- author: Ron Buckton description: > Removing ignoreCase (`i`) modifier affects matching for `\w`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. GetWordCharacters ( modifiers ) The abstract operation GetWordCharacters takes argument modifiers (a Modifiers Record) and returns a CharSet. It performs the following steps when called: 1. Let wordCharacters be the mathematical set that is the union of all sixty-three characters in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" (letters, numbers, and U+005F (LOW LINE) in the Unicode Basic Latin block) and all characters c for which c is not in that set but Canonicalize(c, modifiers) is. 2. Return wordCharacters. esid: sec-compileatom features: [regexp-modifiers] --- 3018
remove-ignoreCase-affects-slash-upper-b.js --- author: Ron Buckton description: > Removing ignoreCase (`i`) modifier affects matching for `\B`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. GetWordCharacters ( modifiers ) The abstract operation GetWordCharacters takes argument modifiers (a Modifiers Record) and returns a CharSet. It performs the following steps when called: 1. Let wordCharacters be the mathematical set that is the union of all sixty-three characters in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" (letters, numbers, and U+005F (LOW LINE) in the Unicode Basic Latin block) and all characters c for which c is not in that set but Canonicalize(c, modifiers) is. 2. Return wordCharacters. esid: sec-compileatom features: [regexp-modifiers] --- 3049
remove-ignoreCase-affects-slash-upper-p.js --- author: Ron Buckton description: > Removing ignoreCase (`i`) modifier affects matching for `\P{}`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. GetWordCharacters ( modifiers ) The abstract operation GetWordCharacters takes argument modifiers (a Modifiers Record) and returns a CharSet. It performs the following steps when called: 1. Let wordCharacters be the mathematical set that is the union of all sixty-three characters in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" (letters, numbers, and U+005F (LOW LINE) in the Unicode Basic Latin block) and all characters c for which c is not in that set but Canonicalize(c, modifiers) is. 2. Return wordCharacters. esid: sec-compileatom features: [regexp-modifiers] --- 3159
remove-ignoreCase-affects-slash-upper-w.js --- author: Ron Buckton description: > Removing ignoreCase (`i`) modifier affects matching for `\W`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. GetWordCharacters ( modifiers ) The abstract operation GetWordCharacters takes argument modifiers (a Modifiers Record) and returns a CharSet. It performs the following steps when called: 1. Let wordCharacters be the mathematical set that is the union of all sixty-three characters in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" (letters, numbers, and U+005F (LOW LINE) in the Unicode Basic Latin block) and all characters c for which c is not in that set but Canonicalize(c, modifiers) is. 2. Return wordCharacters. esid: sec-compileatom features: [regexp-modifiers] --- 3008
remove-ignoreCase-does-not-affect-dotAll-flag.js --- author: Ron Buckton description: > Removing ignoreCase (`i`) modifier in group should not affect dotAll (`s`) flag. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2562
remove-ignoreCase-does-not-affect-ignoreCase-property.js --- author: Ron Buckton description: > Removing ignoreCase (`i`) modifier does not affect RegExp instance `ignoreCase` property. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2579
remove-ignoreCase-does-not-affect-multiline-flag.js --- author: Ron Buckton description: > Removing ignoreCase (`i`) modifier in group should not affect multiline (`m`) flag. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2559
remove-ignoreCase.js --- author: Ron Buckton description: > ignoreCase (`i`) modifier can be removed via `(?i:)` or `(?i-:)`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2691
remove-multiline-does-not-affect-dotAll-flag.js --- author: Ron Buckton description: > Removing multiline (`m`) modifier in group should not affect dotAll (`s`) flag. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2589
remove-multiline-does-not-affect-ignoreCase-flag.js --- author: Ron Buckton description: > Removing multiline (`m`) modifier in group should not affect ignoreCase (`i`) flag. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2565
remove-multiline-does-not-affect-multiline-property.js --- author: Ron Buckton description: > Removing multiline (`m`) modifier does not affect RegExp instance `multiline` property. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by RegularExpressionFlags. 2. Let removeModifiers be the empty String. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), removeModifiers). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2080
remove-multiline.js --- author: Ron Buckton description: > multiline (`m`) modifier can be removed via `(?-m:)`. info: | Runtime Semantics: CompileAtom The syntax-directed operation CompileAtom takes arguments direction (forward or backward) and modifiers (a Modifiers Record) and returns a Matcher. Atom :: `(` `?` RegularExpressionFlags `-` RegularExpressionFlags `:` Disjunction `)` 1. Let addModifiers be the source text matched by the first RegularExpressionFlags. 2. Let removeModifiers be the source text matched by the second RegularExpressionFlags. 3. Let newModifiers be UpdateModifiers(modifiers, CodePointsToString(addModifiers), CodePointsToString(removeModifiers)). 4. Return CompileSubpattern of Disjunction with arguments direction and newModifiers. UpdateModifiers ( modifiers, add, remove ) The abstract operation UpdateModifiers takes arguments modifiers (a Modifiers Record), add (a String), and remove (a String) and returns a Modifiers. It performs the following steps when called: 1. Let dotAll be modifiers.[[DotAll]]. 2. Let ignoreCase be modifiers.[[IgnoreCase]]. 3. Let multiline be modifiers.[[Multiline]]. 4. If add contains "s", set dotAll to true. 5. If add contains "i", set ignoreCase to true. 6. If add contains "m", set multiline to true. 7. If remove contains "s", set dotAll to false. 8. If remove contains "i", set ignoreCase to false. 9. If remove contains "m", set multiline to false. 10. Return the Modifiers Record { [[DotAll]]: dotAll, [[IgnoreCase]]: ignoreCase, [[Multiline]]: multiline }. esid: sec-compileatom features: [regexp-modifiers] --- 2307
shell.js 0
syntax