Skip to content

Commit abc2445

Browse files
authored
Small update to pcre2compat description of braced quantifiers
1 parent 890548a commit abc2445

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/pcre2compat.3

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ any kind of quantifier on non-lookaround assertions.
3434
.P
3535
4. If a braced quantifier such as {1,2} appears where there is nothing to
3636
repeat (for example, at the start of a branch), PCRE2 raises an error whereas
37-
Perl treats the quantifier characters as literal.
37+
Perl treats the quantifier characters as literal. When a braced quantifier
38+
(...){min,max} has min > max, Perl treats it as an item which fails to match
39+
any portion of the subject (as no number of repetitions can meet the
40+
condition), and additionally issues a warning when in warning mode. PCRE2 has
41+
no warning features, so it gives an error in this case.
3842
.P
3943
5. Capture groups that occur inside negative lookaround assertions are counted,
4044
but their entries in the offsets vector are set only when a negative assertion

0 commit comments

Comments
 (0)