File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 48
48
< p >
49
49
4. If a braced quantifier such as {1,2} appears where there is nothing to
50
50
repeat (for example, at the start of a branch), PCRE2 raises an error whereas
51
- Perl treats the quantifier characters as literal.
51
+ Perl treats the quantifier characters as literal. When a braced quantifier
52
+ (...){min,max} has min > max, Perl treats it as an item which fails to match
53
+ any portion of the subject (as no number of repetitions can meet the
54
+ condition), and additionally issues a warning when in warning mode. PCRE2 has
55
+ no warning features, so it gives an error in this case.
52
56
</ p >
53
57
< p >
54
58
5. Capture groups that occur inside negative lookaround assertions are counted,
Original file line number Diff line number Diff line change @@ -5510,7 +5510,12 @@ DIFFERENCES BETWEEN PCRE2 AND PERL
5510
5510
5511
5511
4. If a braced quantifier such as {1,2} appears where there is nothing
5512
5512
to repeat (for example, at the start of a branch), PCRE2 raises an er-
5513
- ror whereas Perl treats the quantifier characters as literal.
5513
+ ror whereas Perl treats the quantifier characters as literal. When a
5514
+ braced quantifier (...){min,max} has min > max, Perl treats it as an
5515
+ item which fails to match any portion of the subject (as no number of
5516
+ repetitions can meet the condition), and additionally issues a warning
5517
+ when in warning mode. PCRE2 has no warning features, so it gives an er-
5518
+ ror in this case.
5514
5519
5515
5520
5. Capture groups that occur inside negative lookaround assertions are
5516
5521
counted, but their entries in the offsets vector are set only when a
Original file line number Diff line number Diff line change @@ -345,6 +345,7 @@ pcre2_pattern_convert(). */
345
345
#define PCRE2_ERROR_PERL_ECLASS_UNEXPECTED_CHAR 216
346
346
#define PCRE2_ERROR_EXPECTED_CAPTURE_GROUP 217
347
347
#define PCRE2_ERROR_MISSING_OPENING_PARENTHESIS 218
348
+ #define PCRE2_ERROR_MISSING_NUMBER_TERMINATOR 219
348
349
349
350
/* "Expected" matching error codes: no match and partial match. */
350
351
You can’t perform that action at this time.
0 commit comments