Name Description Size
add-dotAll-does-not-affect-alternatives-outside.js --- author: Daniel Kwan description: > Adding dotAll (`s`) modifier should not affect alternatives outside. 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] --- 2554
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] --- 2083
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] --- 3313
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] --- 2862
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] --- 8985
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] --- 2740
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] --- 3084
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] --- 2939
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] --- 3862
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] --- 3219
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] --- 3742
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] --- 3039
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] --- 3317
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] --- 2997
add-ignoreCase-does-not-affect-alternatives-outside.js --- author: Daniel Kwan description: > Adding ignoreCase (`i`) modifier should not affect alternatives outside. 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] --- 2448
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] --- 3361
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] --- 2624
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] --- 3364
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] --- 2979
add-multiline-does-not-affect-alternatives-outside.js --- author: Daniel Kwan description: > Adding multiline (`m`) modifier should not affect alternatives outside. 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] --- 2567
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] --- 2862
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] --- 3352
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] --- 2113
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] --- 2842
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] --- 2047
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] --- 5445
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] --- 2848
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] --- 2595
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] --- 2021
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] --- 4786
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] --- 2067
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] --- 2252
nesting-dotAll-does-not-affect-alternatives-outside.js --- author: Daniel Kwan description: > Nesting dotAll (`s`) modifier should not affect alternatives outside. 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] --- 3370
nesting-ignoreCase-does-not-affect-alternatives-outside.js --- author: Daniel Kwan description: > Nesting ignoreCase (`i`) modifier should not affect alternatives outside. 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] --- 3176
nesting-multiline-does-not-affect-alternatives-outside.js --- author: Daniel Kwan description: > Nesting multiline (`m`) modifier should not affect alternatives outside. 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] --- 3391
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] --- 4752
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] --- 2071
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] --- 2290
remove-dotAll-does-not-affect-alternatives-outside.js --- author: Daniel Kwan description: > Removing dotAll (`s`) modifier should not affect alternatives outside. 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] --- 2633
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] --- 2008
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] --- 2407
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] --- 2432
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] --- 5762
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] --- 2140
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] --- 2637
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] --- 2329
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] --- 2869
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] --- 2949
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] --- 2857
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] --- 2888
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] --- 2998
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] --- 2847
remove-ignoreCase-does-not-affect-alternatives-outside.js --- author: Daniel Kwan description: > Removing ignoreCase (`i`) modifier should not affect alternatives outside. 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] --- 2527
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] --- 2401
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] --- 2418
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] --- 2398
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] --- 3958
remove-multiline-does-not-affect-alternatives-outside.js --- author: Daniel Kwan description: > Removing multiline (`m`) modifier should not affect alternatives outside. 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] --- 2646
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] --- 2428
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] --- 2404
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] --- 1919
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] --- 2524
shell.js 0
syntax