diff --git a/tests/baselines/reference/regularExpressionScanning(target=es2015).errors.txt b/tests/baselines/reference/regularExpressionScanning(target=es2015).errors.txt index 4b9ff03556af8..9b8da345e8b04 100644 --- a/tests/baselines/reference/regularExpressionScanning(target=es2015).errors.txt +++ b/tests/baselines/reference/regularExpressionScanning(target=es2015).errors.txt @@ -17,214 +17,216 @@ regularExpressionScanning.ts(5,6): error TS1499: Unknown regular expression flag regularExpressionScanning.ts(5,7): error TS1509: This regular expression flag cannot be toggled within a subpattern. regularExpressionScanning.ts(5,10): error TS1509: This regular expression flag cannot be toggled within a subpattern. regularExpressionScanning.ts(5,11): error TS1500: Duplicate regular expression flag. -regularExpressionScanning.ts(7,9): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. -regularExpressionScanning.ts(7,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. -regularExpressionScanning.ts(7,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. -regularExpressionScanning.ts(7,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'. -regularExpressionScanning.ts(7,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'. -regularExpressionScanning.ts(7,42): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. -regularExpressionScanning.ts(7,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'. -regularExpressionScanning.ts(8,9): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. -regularExpressionScanning.ts(8,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. -regularExpressionScanning.ts(8,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. -regularExpressionScanning.ts(8,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'. -regularExpressionScanning.ts(8,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'. -regularExpressionScanning.ts(8,42): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. -regularExpressionScanning.ts(8,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'. -regularExpressionScanning.ts(9,5): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(9,14): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(9,29): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(9,45): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(9,57): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(10,15): error TS1532: There is no capturing group named 'absent' in this regular expression. -regularExpressionScanning.ts(10,24): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(10,36): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(10,45): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(10,58): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(10,59): error TS1515: Named capturing groups with the same name must be mutually exclusive to each other. -regularExpressionScanning.ts(12,31): error TS1507: There is nothing available for repetition. -regularExpressionScanning.ts(12,32): error TS1506: Numbers out of order in quantifier. -regularExpressionScanning.ts(12,40): error TS1507: There is nothing available for repetition. -regularExpressionScanning.ts(12,61): error TS1505: Incomplete quantifier. Digit expected. -regularExpressionScanning.ts(14,12): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(14,15): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(14,22): error TS1516: A character class range must not be bounded by another character class. -regularExpressionScanning.ts(14,28): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(14,33): error TS1516: A character class range must not be bounded by another character class. -regularExpressionScanning.ts(14,36): error TS1516: A character class range must not be bounded by another character class. -regularExpressionScanning.ts(15,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,8): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,25): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,28): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(15,37): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,50): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,62): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(16,28): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(16,62): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(17,28): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(17,62): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(17,72): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(18,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,6): error TS1524: Unknown Unicode property name. -regularExpressionScanning.ts(18,28): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,31): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(18,32): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(18,33): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,39): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(18,40): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,43): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(18,49): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,52): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(18,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,62): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(18,63): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,66): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(19,6): error TS1524: Unknown Unicode property name. -regularExpressionScanning.ts(19,31): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(19,32): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(19,39): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(19,43): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(19,52): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(19,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces. -regularExpressionScanning.ts(19,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces. -regularExpressionScanning.ts(19,62): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(19,66): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(20,6): error TS1524: Unknown Unicode property name. -regularExpressionScanning.ts(20,31): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(20,32): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(20,39): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(20,43): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(20,52): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(20,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces. -regularExpressionScanning.ts(20,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces. -regularExpressionScanning.ts(20,62): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(20,66): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(20,67): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(21,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,31): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,44): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(22,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(22,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(22,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(22,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(23,19): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(23,31): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(23,47): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(23,59): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(25,17): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(25,23): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(26,3): error TS1512: '\c' must be followed by an ASCII letter. -regularExpressionScanning.ts(26,6): error TS1512: '\c' must be followed by an ASCII letter. -regularExpressionScanning.ts(26,15): error TS1512: '\c' must be followed by an ASCII letter. -regularExpressionScanning.ts(26,17): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(26,20): error TS1512: '\c' must be followed by an ASCII letter. -regularExpressionScanning.ts(26,23): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,3): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,10): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,17): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,21): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,24): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,39): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,43): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,3): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,7): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,10): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,14): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,17): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,21): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,24): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,39): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(28,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(28,43): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,3): error TS1511: '\q' is only available inside character class. -regularExpressionScanning.ts(29,7): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(29,10): error TS1521: '\q' must be followed by string alternatives enclosed in braces. -regularExpressionScanning.ts(29,17): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(29,21): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(29,23): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,38): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,39): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(29,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,43): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(29,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,46): error TS1005: '}' expected. -regularExpressionScanning.ts(29,47): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(31,4): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(31,8): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(31,34): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(31,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(31,55): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(31,63): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(31,76): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(32,4): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(32,8): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(32,19): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(32,50): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(32,51): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(32,55): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(32,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(32,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(32,63): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(32,76): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(33,8): error TS1005: '--' expected. -regularExpressionScanning.ts(33,9): error TS1520: Expected a class set oprand. -regularExpressionScanning.ts(33,11): error TS1520: Expected a class set oprand. -regularExpressionScanning.ts(33,12): error TS1005: '--' expected. -regularExpressionScanning.ts(33,15): error TS1522: A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash? -regularExpressionScanning.ts(33,20): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(33,28): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(33,40): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(33,47): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(33,49): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(33,50): error TS1520: Expected a class set oprand. -regularExpressionScanning.ts(33,55): error TS1511: '\q' is only available inside character class. -regularExpressionScanning.ts(33,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(33,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(33,66): error TS1508: Unexpected '-'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(33,67): error TS1005: '--' expected. -regularExpressionScanning.ts(33,70): error TS1520: Expected a class set oprand. -regularExpressionScanning.ts(33,75): error TS1508: Unexpected '&'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(33,85): error TS1520: Expected a class set oprand. -regularExpressionScanning.ts(33,87): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(34,56): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(34,67): error TS1005: '&&' expected. -regularExpressionScanning.ts(34,77): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(35,83): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(36,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(36,30): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(36,83): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(37,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(37,28): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(37,53): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(37,77): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(38,95): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(39,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(39,34): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(39,95): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(40,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(40,32): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(40,61): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(40,89): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(8,4): error TS1534: This backreference is invalid because the containing regular expression contains no capturing groups. +regularExpressionScanning.ts(9,4): error TS1534: This backreference is invalid because the containing regular expression contains no capturing groups. +regularExpressionScanning.ts(12,9): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. +regularExpressionScanning.ts(12,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. +regularExpressionScanning.ts(12,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. +regularExpressionScanning.ts(12,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'. +regularExpressionScanning.ts(12,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'. +regularExpressionScanning.ts(12,42): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. +regularExpressionScanning.ts(12,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'. +regularExpressionScanning.ts(13,9): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. +regularExpressionScanning.ts(13,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. +regularExpressionScanning.ts(13,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. +regularExpressionScanning.ts(13,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'. +regularExpressionScanning.ts(13,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'. +regularExpressionScanning.ts(13,42): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. +regularExpressionScanning.ts(13,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'. +regularExpressionScanning.ts(14,5): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(14,14): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(14,29): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(14,45): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(14,57): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(15,15): error TS1532: There is no capturing group named 'absent' in this regular expression. +regularExpressionScanning.ts(15,24): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(15,36): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(15,45): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(15,58): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(15,59): error TS1515: Named capturing groups with the same name must be mutually exclusive to each other. +regularExpressionScanning.ts(17,31): error TS1507: There is nothing available for repetition. +regularExpressionScanning.ts(17,32): error TS1506: Numbers out of order in quantifier. +regularExpressionScanning.ts(17,40): error TS1507: There is nothing available for repetition. +regularExpressionScanning.ts(17,61): error TS1505: Incomplete quantifier. Digit expected. +regularExpressionScanning.ts(19,12): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(19,15): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(19,22): error TS1516: A character class range must not be bounded by another character class. +regularExpressionScanning.ts(19,28): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(19,33): error TS1516: A character class range must not be bounded by another character class. +regularExpressionScanning.ts(19,36): error TS1516: A character class range must not be bounded by another character class. +regularExpressionScanning.ts(20,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,8): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,25): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,28): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(20,37): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,50): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,62): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(21,28): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(21,62): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(22,28): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(22,62): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(22,72): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(23,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,6): error TS1524: Unknown Unicode property name. +regularExpressionScanning.ts(23,28): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,31): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(23,32): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(23,33): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,39): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(23,40): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,43): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(23,49): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,52): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(23,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,62): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(23,63): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,66): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(24,6): error TS1524: Unknown Unicode property name. +regularExpressionScanning.ts(24,31): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(24,32): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(24,39): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(24,43): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(24,52): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(24,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces. +regularExpressionScanning.ts(24,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces. +regularExpressionScanning.ts(24,62): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(24,66): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(25,6): error TS1524: Unknown Unicode property name. +regularExpressionScanning.ts(25,31): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(25,32): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(25,39): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(25,43): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(25,52): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(25,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces. +regularExpressionScanning.ts(25,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces. +regularExpressionScanning.ts(25,62): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(25,66): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(25,67): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(26,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,31): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,44): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(27,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(27,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(27,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(27,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(28,19): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(28,31): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(28,47): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(28,59): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(30,17): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(30,23): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(31,3): error TS1512: '\c' must be followed by an ASCII letter. +regularExpressionScanning.ts(31,6): error TS1512: '\c' must be followed by an ASCII letter. +regularExpressionScanning.ts(31,15): error TS1512: '\c' must be followed by an ASCII letter. +regularExpressionScanning.ts(31,17): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(31,20): error TS1512: '\c' must be followed by an ASCII letter. +regularExpressionScanning.ts(31,23): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,3): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,10): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,17): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,21): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,24): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,39): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,43): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,3): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,7): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,10): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,14): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,17): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,21): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,24): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,39): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(33,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(33,43): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,3): error TS1511: '\q' is only available inside character class. +regularExpressionScanning.ts(34,7): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(34,10): error TS1521: '\q' must be followed by string alternatives enclosed in braces. +regularExpressionScanning.ts(34,17): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(34,21): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(34,23): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,38): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,39): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(34,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,43): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(34,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,46): error TS1005: '}' expected. +regularExpressionScanning.ts(34,47): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(36,4): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(36,8): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(36,34): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(36,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(36,55): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(36,63): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(36,76): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(37,4): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(37,8): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(37,19): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(37,50): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(37,51): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(37,55): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(37,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(37,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(37,63): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(37,76): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(38,8): error TS1005: '--' expected. +regularExpressionScanning.ts(38,9): error TS1520: Expected a class set oprand. +regularExpressionScanning.ts(38,11): error TS1520: Expected a class set oprand. +regularExpressionScanning.ts(38,12): error TS1005: '--' expected. +regularExpressionScanning.ts(38,15): error TS1522: A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash? +regularExpressionScanning.ts(38,20): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(38,28): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(38,40): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(38,47): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(38,49): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(38,50): error TS1520: Expected a class set oprand. +regularExpressionScanning.ts(38,55): error TS1511: '\q' is only available inside character class. +regularExpressionScanning.ts(38,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(38,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(38,66): error TS1508: Unexpected '-'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(38,67): error TS1005: '--' expected. +regularExpressionScanning.ts(38,70): error TS1520: Expected a class set oprand. +regularExpressionScanning.ts(38,75): error TS1508: Unexpected '&'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(38,85): error TS1520: Expected a class set oprand. +regularExpressionScanning.ts(38,87): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(39,56): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(39,67): error TS1005: '&&' expected. +regularExpressionScanning.ts(39,77): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(40,83): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. regularExpressionScanning.ts(41,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(41,79): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(41,91): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(41,30): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(41,83): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. regularExpressionScanning.ts(42,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(42,89): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(42,101): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(42,28): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(42,53): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(42,77): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(43,95): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(44,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(44,34): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(44,95): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(45,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(45,32): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(45,61): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(45,89): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(46,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(46,79): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(46,91): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(47,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(47,89): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(47,101): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -==== regularExpressionScanning.ts (224 errors) ==== +==== regularExpressionScanning.ts (226 errors) ==== const regexes: RegExp[] = [ // Flags /foo/visualstudiocode, @@ -269,6 +271,15 @@ regularExpressionScanning.ts(42,101): error TS1501: This regular expression flag ~ !!! error TS1500: Duplicate regular expression flag. // Capturing groups + /\0/, + /\1/, + ~ +!!! error TS1534: This backreference is invalid because the containing regular expression contains no capturing groups. + /\2/, + ~ +!!! error TS1534: This backreference is invalid because the containing regular expression contains no capturing groups. + /(hi)\1/, + /(hi) (hello) \2/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, ~~ !!! error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. diff --git a/tests/baselines/reference/regularExpressionScanning(target=es2015).js b/tests/baselines/reference/regularExpressionScanning(target=es2015).js index 11109bee884c3..0c7a8eb88a13f 100644 --- a/tests/baselines/reference/regularExpressionScanning(target=es2015).js +++ b/tests/baselines/reference/regularExpressionScanning(target=es2015).js @@ -7,6 +7,11 @@ const regexes: RegExp[] = [ // Pattern modifiers /(?med-ium:bar)/, // Capturing groups + /\0/, + /\1/, + /\2/, + /(hi)\1/, + /(hi) (hello) \2/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?)((?bar)bar)(?baz)|(foo(?foo))(?)/, @@ -53,6 +58,11 @@ const regexes = [ // Pattern modifiers /(?med-ium:bar)/, // Capturing groups + /\0/, + /\1/, + /\2/, + /(hi)\1/, + /(hi) (hello) \2/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?)((?bar)bar)(?baz)|(foo(?foo))(?)/, diff --git a/tests/baselines/reference/regularExpressionScanning(target=es2015).symbols b/tests/baselines/reference/regularExpressionScanning(target=es2015).symbols index 129a4de38a1e4..d46a82ed9a797 100644 --- a/tests/baselines/reference/regularExpressionScanning(target=es2015).symbols +++ b/tests/baselines/reference/regularExpressionScanning(target=es2015).symbols @@ -10,6 +10,11 @@ const regexes: RegExp[] = [ // Pattern modifiers /(?med-ium:bar)/, // Capturing groups + /\0/, + /\1/, + /\2/, + /(hi)\1/, + /(hi) (hello) \2/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?)((?bar)bar)(?baz)|(foo(?foo))(?)/, diff --git a/tests/baselines/reference/regularExpressionScanning(target=es2015).types b/tests/baselines/reference/regularExpressionScanning(target=es2015).types index 17d45a2050585..18219dd210a87 100644 --- a/tests/baselines/reference/regularExpressionScanning(target=es2015).types +++ b/tests/baselines/reference/regularExpressionScanning(target=es2015).types @@ -4,8 +4,8 @@ const regexes: RegExp[] = [ >regexes : RegExp[] > : ^^^^^^^^ ->[ // Flags /foo/visualstudiocode, // Pattern modifiers /(?med-ium:bar)/, // Capturing groups /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?)((?bar)bar)(?baz)|(foo(?foo))(?)/, /(\k)\k(?foo)|(?)((?)|(bar(?bar)))/, // Quantifiers /{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/, // Character classes /[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v, // Character escapes /\c[\c0\ca\cQ\c\C]\c1\C/, /\c[\c0\ca\cQ\c\C]\c1\C/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v, // Unicode sets notation /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v, /[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v, /[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v, /[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v, /[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v, /[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v, /[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v, /[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v, /[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v, /[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,] : RegExp[] -> : ^^^^^^^^ +>[ // Flags /foo/visualstudiocode, // Pattern modifiers /(?med-ium:bar)/, // Capturing groups /\0/, /\1/, /\2/, /(hi)\1/, /(hi) (hello) \2/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?)((?bar)bar)(?baz)|(foo(?foo))(?)/, /(\k)\k(?foo)|(?)((?)|(bar(?bar)))/, // Quantifiers /{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/, // Character classes /[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v, // Character escapes /\c[\c0\ca\cQ\c\C]\c1\C/, /\c[\c0\ca\cQ\c\C]\c1\C/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v, // Unicode sets notation /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v, /[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v, /[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v, /[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v, /[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v, /[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v, /[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v, /[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v, /[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v, /[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,] : RegExp[] +> : ^^^^^^^^ // Flags /foo/visualstudiocode, @@ -18,6 +18,26 @@ const regexes: RegExp[] = [ > : ^^^^^^ // Capturing groups + /\0/, +>/\0/ : RegExp +> : ^^^^^^ + + /\1/, +>/\1/ : RegExp +> : ^^^^^^ + + /\2/, +>/\2/ : RegExp +> : ^^^^^^ + + /(hi)\1/, +>/(hi)\1/ : RegExp +> : ^^^^^^ + + /(hi) (hello) \2/, +>/(hi) (hello) \2/ : RegExp +> : ^^^^^^ + /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, >/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/ : RegExp > : ^^^^^^ diff --git a/tests/baselines/reference/regularExpressionScanning(target=es5).errors.txt b/tests/baselines/reference/regularExpressionScanning(target=es5).errors.txt index 5ade5182c1be4..c541a2f4f9219 100644 --- a/tests/baselines/reference/regularExpressionScanning(target=es5).errors.txt +++ b/tests/baselines/reference/regularExpressionScanning(target=es5).errors.txt @@ -17,221 +17,223 @@ regularExpressionScanning.ts(5,6): error TS1499: Unknown regular expression flag regularExpressionScanning.ts(5,7): error TS1509: This regular expression flag cannot be toggled within a subpattern. regularExpressionScanning.ts(5,10): error TS1509: This regular expression flag cannot be toggled within a subpattern. regularExpressionScanning.ts(5,11): error TS1500: Duplicate regular expression flag. -regularExpressionScanning.ts(7,9): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. -regularExpressionScanning.ts(7,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. -regularExpressionScanning.ts(7,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. -regularExpressionScanning.ts(7,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'. -regularExpressionScanning.ts(7,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'. -regularExpressionScanning.ts(7,42): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. -regularExpressionScanning.ts(7,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'. -regularExpressionScanning.ts(8,9): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. -regularExpressionScanning.ts(8,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. -regularExpressionScanning.ts(8,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. -regularExpressionScanning.ts(8,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'. -regularExpressionScanning.ts(8,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'. -regularExpressionScanning.ts(8,42): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. -regularExpressionScanning.ts(8,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'. -regularExpressionScanning.ts(8,48): error TS1501: This regular expression flag is only available when targeting 'es6' or later. -regularExpressionScanning.ts(9,5): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(9,14): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(9,29): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(9,45): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(9,57): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(10,15): error TS1532: There is no capturing group named 'absent' in this regular expression. -regularExpressionScanning.ts(10,24): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(10,36): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(10,45): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(10,58): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. -regularExpressionScanning.ts(10,59): error TS1515: Named capturing groups with the same name must be mutually exclusive to each other. -regularExpressionScanning.ts(12,31): error TS1507: There is nothing available for repetition. -regularExpressionScanning.ts(12,32): error TS1506: Numbers out of order in quantifier. -regularExpressionScanning.ts(12,40): error TS1507: There is nothing available for repetition. -regularExpressionScanning.ts(12,61): error TS1505: Incomplete quantifier. Digit expected. -regularExpressionScanning.ts(14,12): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(14,15): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(14,22): error TS1516: A character class range must not be bounded by another character class. -regularExpressionScanning.ts(14,28): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(14,33): error TS1516: A character class range must not be bounded by another character class. -regularExpressionScanning.ts(14,36): error TS1516: A character class range must not be bounded by another character class. -regularExpressionScanning.ts(15,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,8): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,25): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,28): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(15,37): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,50): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,62): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(16,28): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(16,62): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(16,72): error TS1501: This regular expression flag is only available when targeting 'es6' or later. -regularExpressionScanning.ts(17,28): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(17,62): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(17,72): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(18,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,6): error TS1524: Unknown Unicode property name. -regularExpressionScanning.ts(18,28): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,31): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(18,32): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(18,33): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,39): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(18,40): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,43): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(18,49): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,52): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(18,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,62): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(18,63): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,66): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(19,6): error TS1524: Unknown Unicode property name. -regularExpressionScanning.ts(19,31): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(19,32): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(19,39): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(19,43): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(19,52): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(19,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces. -regularExpressionScanning.ts(19,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces. -regularExpressionScanning.ts(19,62): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(19,66): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(19,67): error TS1501: This regular expression flag is only available when targeting 'es6' or later. -regularExpressionScanning.ts(20,6): error TS1524: Unknown Unicode property name. -regularExpressionScanning.ts(20,31): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(20,32): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(20,39): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(20,43): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(20,52): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(20,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces. -regularExpressionScanning.ts(20,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces. -regularExpressionScanning.ts(20,62): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(20,66): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(20,67): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(21,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,31): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,44): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(22,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(22,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(22,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(22,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(22,59): error TS1501: This regular expression flag is only available when targeting 'es6' or later. -regularExpressionScanning.ts(23,19): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(23,31): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(23,47): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(23,59): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(25,17): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(25,23): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(26,3): error TS1512: '\c' must be followed by an ASCII letter. -regularExpressionScanning.ts(26,6): error TS1512: '\c' must be followed by an ASCII letter. -regularExpressionScanning.ts(26,15): error TS1512: '\c' must be followed by an ASCII letter. -regularExpressionScanning.ts(26,17): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(26,20): error TS1512: '\c' must be followed by an ASCII letter. -regularExpressionScanning.ts(26,23): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(26,26): error TS1501: This regular expression flag is only available when targeting 'es6' or later. -regularExpressionScanning.ts(27,3): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,10): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,17): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,21): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,24): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,39): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,43): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,3): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,7): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,10): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,14): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,17): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,21): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,24): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,39): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(28,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(28,43): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(28,47): error TS1501: This regular expression flag is only available when targeting 'es6' or later. -regularExpressionScanning.ts(29,3): error TS1511: '\q' is only available inside character class. -regularExpressionScanning.ts(29,7): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(29,10): error TS1521: '\q' must be followed by string alternatives enclosed in braces. -regularExpressionScanning.ts(29,17): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(29,21): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(29,23): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,38): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,39): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(29,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,43): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(29,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,46): error TS1005: '}' expected. -regularExpressionScanning.ts(29,47): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(31,4): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(31,8): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(31,34): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(31,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(31,55): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(31,63): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(31,76): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(32,4): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(32,8): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(32,19): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(32,50): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(32,51): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(32,55): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(32,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(32,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(32,63): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(32,76): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(32,87): error TS1501: This regular expression flag is only available when targeting 'es6' or later. -regularExpressionScanning.ts(33,8): error TS1005: '--' expected. -regularExpressionScanning.ts(33,9): error TS1520: Expected a class set oprand. -regularExpressionScanning.ts(33,11): error TS1520: Expected a class set oprand. -regularExpressionScanning.ts(33,12): error TS1005: '--' expected. -regularExpressionScanning.ts(33,15): error TS1522: A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash? -regularExpressionScanning.ts(33,20): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(33,28): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(33,40): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(33,47): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(33,49): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(33,50): error TS1520: Expected a class set oprand. -regularExpressionScanning.ts(33,55): error TS1511: '\q' is only available inside character class. -regularExpressionScanning.ts(33,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(33,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(33,66): error TS1508: Unexpected '-'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(33,67): error TS1005: '--' expected. -regularExpressionScanning.ts(33,70): error TS1520: Expected a class set oprand. -regularExpressionScanning.ts(33,75): error TS1508: Unexpected '&'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(33,85): error TS1520: Expected a class set oprand. -regularExpressionScanning.ts(33,87): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(34,56): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(34,67): error TS1005: '&&' expected. -regularExpressionScanning.ts(34,77): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(35,83): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(36,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(36,30): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(36,83): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(37,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(37,28): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(37,53): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(37,77): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(38,95): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(39,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(39,34): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(39,95): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -regularExpressionScanning.ts(40,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(40,32): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(40,61): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(40,89): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(8,4): error TS1534: This backreference is invalid because the containing regular expression contains no capturing groups. +regularExpressionScanning.ts(9,4): error TS1534: This backreference is invalid because the containing regular expression contains no capturing groups. +regularExpressionScanning.ts(12,9): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. +regularExpressionScanning.ts(12,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. +regularExpressionScanning.ts(12,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. +regularExpressionScanning.ts(12,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'. +regularExpressionScanning.ts(12,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'. +regularExpressionScanning.ts(12,42): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. +regularExpressionScanning.ts(12,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'. +regularExpressionScanning.ts(13,9): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. +regularExpressionScanning.ts(13,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. +regularExpressionScanning.ts(13,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. +regularExpressionScanning.ts(13,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'. +regularExpressionScanning.ts(13,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'. +regularExpressionScanning.ts(13,42): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. +regularExpressionScanning.ts(13,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'. +regularExpressionScanning.ts(13,48): error TS1501: This regular expression flag is only available when targeting 'es6' or later. +regularExpressionScanning.ts(14,5): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(14,14): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(14,29): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(14,45): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(14,57): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(15,15): error TS1532: There is no capturing group named 'absent' in this regular expression. +regularExpressionScanning.ts(15,24): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(15,36): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(15,45): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(15,58): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later. +regularExpressionScanning.ts(15,59): error TS1515: Named capturing groups with the same name must be mutually exclusive to each other. +regularExpressionScanning.ts(17,31): error TS1507: There is nothing available for repetition. +regularExpressionScanning.ts(17,32): error TS1506: Numbers out of order in quantifier. +regularExpressionScanning.ts(17,40): error TS1507: There is nothing available for repetition. +regularExpressionScanning.ts(17,61): error TS1505: Incomplete quantifier. Digit expected. +regularExpressionScanning.ts(19,12): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(19,15): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(19,22): error TS1516: A character class range must not be bounded by another character class. +regularExpressionScanning.ts(19,28): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(19,33): error TS1516: A character class range must not be bounded by another character class. +regularExpressionScanning.ts(19,36): error TS1516: A character class range must not be bounded by another character class. +regularExpressionScanning.ts(20,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,8): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,25): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,28): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(20,37): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,50): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,62): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(21,28): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(21,62): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(21,72): error TS1501: This regular expression flag is only available when targeting 'es6' or later. +regularExpressionScanning.ts(22,28): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(22,62): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(22,72): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(23,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,6): error TS1524: Unknown Unicode property name. +regularExpressionScanning.ts(23,28): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,31): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(23,32): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(23,33): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,39): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(23,40): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,43): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(23,49): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,52): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(23,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,62): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(23,63): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,66): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(24,6): error TS1524: Unknown Unicode property name. +regularExpressionScanning.ts(24,31): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(24,32): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(24,39): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(24,43): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(24,52): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(24,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces. +regularExpressionScanning.ts(24,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces. +regularExpressionScanning.ts(24,62): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(24,66): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(24,67): error TS1501: This regular expression flag is only available when targeting 'es6' or later. +regularExpressionScanning.ts(25,6): error TS1524: Unknown Unicode property name. +regularExpressionScanning.ts(25,31): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(25,32): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(25,39): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(25,43): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(25,52): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(25,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces. +regularExpressionScanning.ts(25,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces. +regularExpressionScanning.ts(25,62): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(25,66): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(25,67): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(26,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,31): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,44): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(27,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(27,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(27,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(27,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(27,59): error TS1501: This regular expression flag is only available when targeting 'es6' or later. +regularExpressionScanning.ts(28,19): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(28,31): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(28,47): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(28,59): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(30,17): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(30,23): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(31,3): error TS1512: '\c' must be followed by an ASCII letter. +regularExpressionScanning.ts(31,6): error TS1512: '\c' must be followed by an ASCII letter. +regularExpressionScanning.ts(31,15): error TS1512: '\c' must be followed by an ASCII letter. +regularExpressionScanning.ts(31,17): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(31,20): error TS1512: '\c' must be followed by an ASCII letter. +regularExpressionScanning.ts(31,23): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(31,26): error TS1501: This regular expression flag is only available when targeting 'es6' or later. +regularExpressionScanning.ts(32,3): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,10): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,17): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,21): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,24): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,39): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,43): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,3): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,7): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,10): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,14): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,17): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,21): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,24): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,39): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(33,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(33,43): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(33,47): error TS1501: This regular expression flag is only available when targeting 'es6' or later. +regularExpressionScanning.ts(34,3): error TS1511: '\q' is only available inside character class. +regularExpressionScanning.ts(34,7): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(34,10): error TS1521: '\q' must be followed by string alternatives enclosed in braces. +regularExpressionScanning.ts(34,17): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(34,21): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(34,23): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,38): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,39): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(34,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,43): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(34,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,46): error TS1005: '}' expected. +regularExpressionScanning.ts(34,47): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(36,4): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(36,8): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(36,34): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(36,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(36,55): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(36,63): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(36,76): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(37,4): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(37,8): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(37,19): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(37,50): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(37,51): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(37,55): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(37,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(37,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(37,63): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(37,76): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(37,87): error TS1501: This regular expression flag is only available when targeting 'es6' or later. +regularExpressionScanning.ts(38,8): error TS1005: '--' expected. +regularExpressionScanning.ts(38,9): error TS1520: Expected a class set oprand. +regularExpressionScanning.ts(38,11): error TS1520: Expected a class set oprand. +regularExpressionScanning.ts(38,12): error TS1005: '--' expected. +regularExpressionScanning.ts(38,15): error TS1522: A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash? +regularExpressionScanning.ts(38,20): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(38,28): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(38,40): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(38,47): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(38,49): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(38,50): error TS1520: Expected a class set oprand. +regularExpressionScanning.ts(38,55): error TS1511: '\q' is only available inside character class. +regularExpressionScanning.ts(38,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(38,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(38,66): error TS1508: Unexpected '-'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(38,67): error TS1005: '--' expected. +regularExpressionScanning.ts(38,70): error TS1520: Expected a class set oprand. +regularExpressionScanning.ts(38,75): error TS1508: Unexpected '&'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(38,85): error TS1520: Expected a class set oprand. +regularExpressionScanning.ts(38,87): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(39,56): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(39,67): error TS1005: '&&' expected. +regularExpressionScanning.ts(39,77): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(40,83): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. regularExpressionScanning.ts(41,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(41,79): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(41,91): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(41,30): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(41,83): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. regularExpressionScanning.ts(42,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(42,89): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(42,101): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(42,28): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(42,53): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(42,77): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(43,95): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(44,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(44,34): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(44,95): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(45,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(45,32): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(45,61): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(45,89): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(46,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(46,79): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(46,91): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. +regularExpressionScanning.ts(47,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(47,89): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(47,101): error TS1501: This regular expression flag is only available when targeting 'esnext' or later. -==== regularExpressionScanning.ts (231 errors) ==== +==== regularExpressionScanning.ts (233 errors) ==== const regexes: RegExp[] = [ // Flags /foo/visualstudiocode, @@ -276,6 +278,15 @@ regularExpressionScanning.ts(42,101): error TS1501: This regular expression flag ~ !!! error TS1500: Duplicate regular expression flag. // Capturing groups + /\0/, + /\1/, + ~ +!!! error TS1534: This backreference is invalid because the containing regular expression contains no capturing groups. + /\2/, + ~ +!!! error TS1534: This backreference is invalid because the containing regular expression contains no capturing groups. + /(hi)\1/, + /(hi) (hello) \2/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, ~~ !!! error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. diff --git a/tests/baselines/reference/regularExpressionScanning(target=es5).js b/tests/baselines/reference/regularExpressionScanning(target=es5).js index 7398dfd0d533f..fa691f88c1b0f 100644 --- a/tests/baselines/reference/regularExpressionScanning(target=es5).js +++ b/tests/baselines/reference/regularExpressionScanning(target=es5).js @@ -7,6 +7,11 @@ const regexes: RegExp[] = [ // Pattern modifiers /(?med-ium:bar)/, // Capturing groups + /\0/, + /\1/, + /\2/, + /(hi)\1/, + /(hi) (hello) \2/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?)((?bar)bar)(?baz)|(foo(?foo))(?)/, @@ -53,6 +58,11 @@ var regexes = [ // Pattern modifiers /(?med-ium:bar)/, // Capturing groups + /\0/, + /\1/, + /\2/, + /(hi)\1/, + /(hi) (hello) \2/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?)((?bar)bar)(?baz)|(foo(?foo))(?)/, diff --git a/tests/baselines/reference/regularExpressionScanning(target=es5).symbols b/tests/baselines/reference/regularExpressionScanning(target=es5).symbols index 33232d175f545..7f424ca297bad 100644 --- a/tests/baselines/reference/regularExpressionScanning(target=es5).symbols +++ b/tests/baselines/reference/regularExpressionScanning(target=es5).symbols @@ -10,6 +10,11 @@ const regexes: RegExp[] = [ // Pattern modifiers /(?med-ium:bar)/, // Capturing groups + /\0/, + /\1/, + /\2/, + /(hi)\1/, + /(hi) (hello) \2/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?)((?bar)bar)(?baz)|(foo(?foo))(?)/, diff --git a/tests/baselines/reference/regularExpressionScanning(target=es5).types b/tests/baselines/reference/regularExpressionScanning(target=es5).types index 17d45a2050585..18219dd210a87 100644 --- a/tests/baselines/reference/regularExpressionScanning(target=es5).types +++ b/tests/baselines/reference/regularExpressionScanning(target=es5).types @@ -4,8 +4,8 @@ const regexes: RegExp[] = [ >regexes : RegExp[] > : ^^^^^^^^ ->[ // Flags /foo/visualstudiocode, // Pattern modifiers /(?med-ium:bar)/, // Capturing groups /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?)((?bar)bar)(?baz)|(foo(?foo))(?)/, /(\k)\k(?foo)|(?)((?)|(bar(?bar)))/, // Quantifiers /{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/, // Character classes /[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v, // Character escapes /\c[\c0\ca\cQ\c\C]\c1\C/, /\c[\c0\ca\cQ\c\C]\c1\C/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v, // Unicode sets notation /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v, /[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v, /[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v, /[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v, /[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v, /[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v, /[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v, /[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v, /[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v, /[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,] : RegExp[] -> : ^^^^^^^^ +>[ // Flags /foo/visualstudiocode, // Pattern modifiers /(?med-ium:bar)/, // Capturing groups /\0/, /\1/, /\2/, /(hi)\1/, /(hi) (hello) \2/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?)((?bar)bar)(?baz)|(foo(?foo))(?)/, /(\k)\k(?foo)|(?)((?)|(bar(?bar)))/, // Quantifiers /{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/, // Character classes /[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v, // Character escapes /\c[\c0\ca\cQ\c\C]\c1\C/, /\c[\c0\ca\cQ\c\C]\c1\C/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v, // Unicode sets notation /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v, /[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v, /[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v, /[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v, /[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v, /[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v, /[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v, /[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v, /[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v, /[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,] : RegExp[] +> : ^^^^^^^^ // Flags /foo/visualstudiocode, @@ -18,6 +18,26 @@ const regexes: RegExp[] = [ > : ^^^^^^ // Capturing groups + /\0/, +>/\0/ : RegExp +> : ^^^^^^ + + /\1/, +>/\1/ : RegExp +> : ^^^^^^ + + /\2/, +>/\2/ : RegExp +> : ^^^^^^ + + /(hi)\1/, +>/(hi)\1/ : RegExp +> : ^^^^^^ + + /(hi) (hello) \2/, +>/(hi) (hello) \2/ : RegExp +> : ^^^^^^ + /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, >/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/ : RegExp > : ^^^^^^ diff --git a/tests/baselines/reference/regularExpressionScanning(target=esnext).errors.txt b/tests/baselines/reference/regularExpressionScanning(target=esnext).errors.txt index 8c18344269f13..6cf747d701653 100644 --- a/tests/baselines/reference/regularExpressionScanning(target=esnext).errors.txt +++ b/tests/baselines/reference/regularExpressionScanning(target=esnext).errors.txt @@ -14,191 +14,193 @@ regularExpressionScanning.ts(5,6): error TS1499: Unknown regular expression flag regularExpressionScanning.ts(5,7): error TS1509: This regular expression flag cannot be toggled within a subpattern. regularExpressionScanning.ts(5,10): error TS1509: This regular expression flag cannot be toggled within a subpattern. regularExpressionScanning.ts(5,11): error TS1500: Duplicate regular expression flag. -regularExpressionScanning.ts(7,9): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. -regularExpressionScanning.ts(7,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. -regularExpressionScanning.ts(7,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. -regularExpressionScanning.ts(7,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'. -regularExpressionScanning.ts(7,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'. -regularExpressionScanning.ts(7,42): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. -regularExpressionScanning.ts(7,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'. -regularExpressionScanning.ts(8,9): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. -regularExpressionScanning.ts(8,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. -regularExpressionScanning.ts(8,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. -regularExpressionScanning.ts(8,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'. -regularExpressionScanning.ts(8,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'. -regularExpressionScanning.ts(8,42): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. -regularExpressionScanning.ts(8,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'. -regularExpressionScanning.ts(10,15): error TS1532: There is no capturing group named 'absent' in this regular expression. -regularExpressionScanning.ts(10,59): error TS1515: Named capturing groups with the same name must be mutually exclusive to each other. -regularExpressionScanning.ts(12,31): error TS1507: There is nothing available for repetition. -regularExpressionScanning.ts(12,32): error TS1506: Numbers out of order in quantifier. -regularExpressionScanning.ts(12,40): error TS1507: There is nothing available for repetition. -regularExpressionScanning.ts(12,61): error TS1505: Incomplete quantifier. Digit expected. -regularExpressionScanning.ts(14,12): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(14,15): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(14,22): error TS1516: A character class range must not be bounded by another character class. -regularExpressionScanning.ts(14,28): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(14,33): error TS1516: A character class range must not be bounded by another character class. -regularExpressionScanning.ts(14,36): error TS1516: A character class range must not be bounded by another character class. -regularExpressionScanning.ts(15,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,8): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,25): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,28): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(15,37): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,50): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(15,62): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(16,28): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(16,62): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(17,28): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(17,62): error TS1529: Unknown Unicode property name or value. -regularExpressionScanning.ts(18,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,6): error TS1524: Unknown Unicode property name. -regularExpressionScanning.ts(18,28): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,31): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(18,32): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(18,33): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,39): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(18,40): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,43): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(18,49): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,52): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(18,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,62): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(18,63): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(18,66): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(19,6): error TS1524: Unknown Unicode property name. -regularExpressionScanning.ts(19,31): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(19,32): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(19,39): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(19,43): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(19,52): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(19,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces. -regularExpressionScanning.ts(19,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces. -regularExpressionScanning.ts(19,62): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(19,66): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(20,6): error TS1524: Unknown Unicode property name. -regularExpressionScanning.ts(20,31): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(20,32): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(20,39): error TS1525: Expected a Unicode property value. -regularExpressionScanning.ts(20,43): error TS1523: Expected a Unicode property name. -regularExpressionScanning.ts(20,52): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(20,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces. -regularExpressionScanning.ts(20,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces. -regularExpressionScanning.ts(20,62): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(20,66): error TS1527: Expected a Unicode property name or value. -regularExpressionScanning.ts(21,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,31): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,44): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(21,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(22,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(22,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(22,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(22,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(23,19): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(23,31): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(23,47): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(25,17): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(25,23): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(26,3): error TS1512: '\c' must be followed by an ASCII letter. -regularExpressionScanning.ts(26,6): error TS1512: '\c' must be followed by an ASCII letter. -regularExpressionScanning.ts(26,15): error TS1512: '\c' must be followed by an ASCII letter. -regularExpressionScanning.ts(26,17): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(26,20): error TS1512: '\c' must be followed by an ASCII letter. -regularExpressionScanning.ts(26,23): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,3): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,10): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,17): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,21): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,24): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,39): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(27,43): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,3): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,7): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,10): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,14): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,17): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,21): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,24): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,39): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(28,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(28,43): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(28,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,3): error TS1511: '\q' is only available inside character class. -regularExpressionScanning.ts(29,7): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(29,10): error TS1521: '\q' must be followed by string alternatives enclosed in braces. -regularExpressionScanning.ts(29,17): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(29,21): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(29,23): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,38): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,39): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(29,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,43): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(29,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(29,46): error TS1005: '}' expected. -regularExpressionScanning.ts(31,4): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(31,8): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(31,34): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(31,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. -regularExpressionScanning.ts(31,55): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(31,63): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(31,76): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(32,4): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(32,8): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(32,19): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(32,50): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(32,51): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(32,55): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(32,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(32,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(32,63): error TS1517: Range out of order in character class. -regularExpressionScanning.ts(32,76): error TS1535: This character cannot be escaped in a regular expression. -regularExpressionScanning.ts(33,8): error TS1005: '--' expected. -regularExpressionScanning.ts(33,9): error TS1520: Expected a class set oprand. -regularExpressionScanning.ts(33,11): error TS1520: Expected a class set oprand. -regularExpressionScanning.ts(33,12): error TS1005: '--' expected. -regularExpressionScanning.ts(33,15): error TS1522: A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash? -regularExpressionScanning.ts(33,20): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(33,28): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(33,40): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(33,47): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(33,49): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(33,50): error TS1520: Expected a class set oprand. -regularExpressionScanning.ts(33,55): error TS1511: '\q' is only available inside character class. -regularExpressionScanning.ts(33,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(33,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(33,66): error TS1508: Unexpected '-'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(33,67): error TS1005: '--' expected. -regularExpressionScanning.ts(33,70): error TS1520: Expected a class set oprand. -regularExpressionScanning.ts(33,75): error TS1508: Unexpected '&'. Did you mean to escape it with backslash? -regularExpressionScanning.ts(33,85): error TS1520: Expected a class set oprand. -regularExpressionScanning.ts(34,56): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. -regularExpressionScanning.ts(34,67): error TS1005: '&&' expected. -regularExpressionScanning.ts(36,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(36,30): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(37,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(37,28): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(37,53): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(39,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(39,34): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(40,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(40,32): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(40,61): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(8,4): error TS1534: This backreference is invalid because the containing regular expression contains no capturing groups. +regularExpressionScanning.ts(9,4): error TS1534: This backreference is invalid because the containing regular expression contains no capturing groups. +regularExpressionScanning.ts(12,9): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. +regularExpressionScanning.ts(12,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. +regularExpressionScanning.ts(12,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. +regularExpressionScanning.ts(12,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'. +regularExpressionScanning.ts(12,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'. +regularExpressionScanning.ts(12,42): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. +regularExpressionScanning.ts(12,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'. +regularExpressionScanning.ts(13,9): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. +regularExpressionScanning.ts(13,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. +regularExpressionScanning.ts(13,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'. +regularExpressionScanning.ts(13,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'. +regularExpressionScanning.ts(13,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'. +regularExpressionScanning.ts(13,42): error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. +regularExpressionScanning.ts(13,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'. +regularExpressionScanning.ts(15,15): error TS1532: There is no capturing group named 'absent' in this regular expression. +regularExpressionScanning.ts(15,59): error TS1515: Named capturing groups with the same name must be mutually exclusive to each other. +regularExpressionScanning.ts(17,31): error TS1507: There is nothing available for repetition. +regularExpressionScanning.ts(17,32): error TS1506: Numbers out of order in quantifier. +regularExpressionScanning.ts(17,40): error TS1507: There is nothing available for repetition. +regularExpressionScanning.ts(17,61): error TS1505: Incomplete quantifier. Digit expected. +regularExpressionScanning.ts(19,12): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(19,15): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(19,22): error TS1516: A character class range must not be bounded by another character class. +regularExpressionScanning.ts(19,28): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(19,33): error TS1516: A character class range must not be bounded by another character class. +regularExpressionScanning.ts(19,36): error TS1516: A character class range must not be bounded by another character class. +regularExpressionScanning.ts(20,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,8): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,25): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,28): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(20,37): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,50): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(20,62): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(21,28): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(21,62): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(22,28): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(22,62): error TS1529: Unknown Unicode property name or value. +regularExpressionScanning.ts(23,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,6): error TS1524: Unknown Unicode property name. +regularExpressionScanning.ts(23,28): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,31): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(23,32): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(23,33): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,39): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(23,40): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,43): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(23,49): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,52): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(23,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,62): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(23,63): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(23,66): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(24,6): error TS1524: Unknown Unicode property name. +regularExpressionScanning.ts(24,31): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(24,32): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(24,39): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(24,43): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(24,52): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(24,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces. +regularExpressionScanning.ts(24,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces. +regularExpressionScanning.ts(24,62): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(24,66): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(25,6): error TS1524: Unknown Unicode property name. +regularExpressionScanning.ts(25,31): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(25,32): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(25,39): error TS1525: Expected a Unicode property value. +regularExpressionScanning.ts(25,43): error TS1523: Expected a Unicode property name. +regularExpressionScanning.ts(25,52): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(25,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces. +regularExpressionScanning.ts(25,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces. +regularExpressionScanning.ts(25,62): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(25,66): error TS1527: Expected a Unicode property name or value. +regularExpressionScanning.ts(26,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,31): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,44): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(26,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(27,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(27,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(27,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(27,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(28,19): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(28,31): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(28,47): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(30,17): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(30,23): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(31,3): error TS1512: '\c' must be followed by an ASCII letter. +regularExpressionScanning.ts(31,6): error TS1512: '\c' must be followed by an ASCII letter. +regularExpressionScanning.ts(31,15): error TS1512: '\c' must be followed by an ASCII letter. +regularExpressionScanning.ts(31,17): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(31,20): error TS1512: '\c' must be followed by an ASCII letter. +regularExpressionScanning.ts(31,23): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,3): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,10): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,17): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,21): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,24): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,39): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(32,43): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,3): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,7): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,10): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,14): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,17): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,21): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,24): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,39): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(33,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(33,43): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(33,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,3): error TS1511: '\q' is only available inside character class. +regularExpressionScanning.ts(34,7): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(34,10): error TS1521: '\q' must be followed by string alternatives enclosed in braces. +regularExpressionScanning.ts(34,17): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(34,21): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(34,23): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,38): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,39): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(34,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,43): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(34,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(34,46): error TS1005: '}' expected. +regularExpressionScanning.ts(36,4): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(36,8): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(36,34): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(36,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set. +regularExpressionScanning.ts(36,55): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(36,63): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(36,76): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(37,4): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(37,8): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(37,19): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(37,50): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(37,51): error TS1508: Unexpected ']'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(37,55): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(37,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(37,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(37,63): error TS1517: Range out of order in character class. +regularExpressionScanning.ts(37,76): error TS1535: This character cannot be escaped in a regular expression. +regularExpressionScanning.ts(38,8): error TS1005: '--' expected. +regularExpressionScanning.ts(38,9): error TS1520: Expected a class set oprand. +regularExpressionScanning.ts(38,11): error TS1520: Expected a class set oprand. +regularExpressionScanning.ts(38,12): error TS1005: '--' expected. +regularExpressionScanning.ts(38,15): error TS1522: A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash? +regularExpressionScanning.ts(38,20): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(38,28): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(38,40): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(38,47): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(38,49): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(38,50): error TS1520: Expected a class set oprand. +regularExpressionScanning.ts(38,55): error TS1511: '\q' is only available inside character class. +regularExpressionScanning.ts(38,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(38,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(38,66): error TS1508: Unexpected '-'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(38,67): error TS1005: '--' expected. +regularExpressionScanning.ts(38,70): error TS1520: Expected a class set oprand. +regularExpressionScanning.ts(38,75): error TS1508: Unexpected '&'. Did you mean to escape it with backslash? +regularExpressionScanning.ts(38,85): error TS1520: Expected a class set oprand. +regularExpressionScanning.ts(39,56): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead. +regularExpressionScanning.ts(39,67): error TS1005: '&&' expected. regularExpressionScanning.ts(41,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(41,79): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(41,30): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. regularExpressionScanning.ts(42,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -regularExpressionScanning.ts(42,89): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(42,28): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(42,53): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(44,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(44,34): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(45,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(45,32): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(45,61): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(46,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(46,79): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(47,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. +regularExpressionScanning.ts(47,89): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class. -==== regularExpressionScanning.ts (198 errors) ==== +==== regularExpressionScanning.ts (200 errors) ==== const regexes: RegExp[] = [ // Flags /foo/visualstudiocode, @@ -237,6 +239,15 @@ regularExpressionScanning.ts(42,89): error TS1518: Anything that would possibly ~ !!! error TS1500: Duplicate regular expression flag. // Capturing groups + /\0/, + /\1/, + ~ +!!! error TS1534: This backreference is invalid because the containing regular expression contains no capturing groups. + /\2/, + ~ +!!! error TS1534: This backreference is invalid because the containing regular expression contains no capturing groups. + /(hi)\1/, + /(hi) (hello) \2/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, ~~ !!! error TS1533: This backreference refers to a group that does not exist. There are only 4 capturing groups in this regular expression. diff --git a/tests/baselines/reference/regularExpressionScanning(target=esnext).js b/tests/baselines/reference/regularExpressionScanning(target=esnext).js index 11109bee884c3..0c7a8eb88a13f 100644 --- a/tests/baselines/reference/regularExpressionScanning(target=esnext).js +++ b/tests/baselines/reference/regularExpressionScanning(target=esnext).js @@ -7,6 +7,11 @@ const regexes: RegExp[] = [ // Pattern modifiers /(?med-ium:bar)/, // Capturing groups + /\0/, + /\1/, + /\2/, + /(hi)\1/, + /(hi) (hello) \2/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?)((?bar)bar)(?baz)|(foo(?foo))(?)/, @@ -53,6 +58,11 @@ const regexes = [ // Pattern modifiers /(?med-ium:bar)/, // Capturing groups + /\0/, + /\1/, + /\2/, + /(hi)\1/, + /(hi) (hello) \2/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?)((?bar)bar)(?baz)|(foo(?foo))(?)/, diff --git a/tests/baselines/reference/regularExpressionScanning(target=esnext).symbols b/tests/baselines/reference/regularExpressionScanning(target=esnext).symbols index d62c186dc8c3d..72c3617f33d6f 100644 --- a/tests/baselines/reference/regularExpressionScanning(target=esnext).symbols +++ b/tests/baselines/reference/regularExpressionScanning(target=esnext).symbols @@ -10,6 +10,11 @@ const regexes: RegExp[] = [ // Pattern modifiers /(?med-ium:bar)/, // Capturing groups + /\0/, + /\1/, + /\2/, + /(hi)\1/, + /(hi) (hello) \2/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?)((?bar)bar)(?baz)|(foo(?foo))(?)/, diff --git a/tests/baselines/reference/regularExpressionScanning(target=esnext).types b/tests/baselines/reference/regularExpressionScanning(target=esnext).types index 17d45a2050585..18219dd210a87 100644 --- a/tests/baselines/reference/regularExpressionScanning(target=esnext).types +++ b/tests/baselines/reference/regularExpressionScanning(target=esnext).types @@ -4,8 +4,8 @@ const regexes: RegExp[] = [ >regexes : RegExp[] > : ^^^^^^^^ ->[ // Flags /foo/visualstudiocode, // Pattern modifiers /(?med-ium:bar)/, // Capturing groups /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?)((?bar)bar)(?baz)|(foo(?foo))(?)/, /(\k)\k(?foo)|(?)((?)|(bar(?bar)))/, // Quantifiers /{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/, // Character classes /[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v, // Character escapes /\c[\c0\ca\cQ\c\C]\c1\C/, /\c[\c0\ca\cQ\c\C]\c1\C/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v, // Unicode sets notation /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v, /[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v, /[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v, /[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v, /[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v, /[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v, /[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v, /[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v, /[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v, /[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,] : RegExp[] -> : ^^^^^^^^ +>[ // Flags /foo/visualstudiocode, // Pattern modifiers /(?med-ium:bar)/, // Capturing groups /\0/, /\1/, /\2/, /(hi)\1/, /(hi) (hello) \2/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?)((?bar)bar)(?baz)|(foo(?foo))(?)/, /(\k)\k(?foo)|(?)((?)|(bar(?bar)))/, // Quantifiers /{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/, // Character classes /[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v, // Character escapes /\c[\c0\ca\cQ\c\C]\c1\C/, /\c[\c0\ca\cQ\c\C]\c1\C/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v, // Unicode sets notation /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v, /[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v, /[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v, /[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v, /[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v, /[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v, /[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v, /[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v, /[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v, /[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,] : RegExp[] +> : ^^^^^^^^ // Flags /foo/visualstudiocode, @@ -18,6 +18,26 @@ const regexes: RegExp[] = [ > : ^^^^^^ // Capturing groups + /\0/, +>/\0/ : RegExp +> : ^^^^^^ + + /\1/, +>/\1/ : RegExp +> : ^^^^^^ + + /\2/, +>/\2/ : RegExp +> : ^^^^^^ + + /(hi)\1/, +>/(hi)\1/ : RegExp +> : ^^^^^^ + + /(hi) (hello) \2/, +>/(hi) (hello) \2/ : RegExp +> : ^^^^^^ + /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, >/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/ : RegExp > : ^^^^^^