wok view pcre/stuff/r661.diff @ rev 11134
Up: xorg-xproto to 7.0.22.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Wed Oct 26 20:56:53 2011 +0000 (2011-10-26) |
parents | |
children |
line source
1 --- code/trunk/pcre_compile.c 2011/08/02 11:00:40 654
2 +++ code/trunk/pcre_compile.c 2011/08/21 09:00:54 661
3 @@ -2295,8 +2295,13 @@
4 A user pointed out that PCRE was rejecting [:a[:digit:]] whereas Perl was not.
5 It seems that the appearance of a nested POSIX class supersedes an apparent
6 external class. For example, [:a[:digit:]b:] matches "a", "b", ":", or
7 -a digit. Also, unescaped square brackets may also appear as part of class
8 -names. For example, [:a[:abc]b:] gives unknown class "[:abc]b:]"in Perl.
9 +a digit.
10 +
11 +In Perl, unescaped square brackets may also appear as part of class names. For
12 +example, [:a[:abc]b:] gives unknown POSIX class "[:abc]b:]". However, for
13 +[:a[:abc]b][b:] it gives unknown POSIX class "[:abc]b][b:]", which does not
14 +seem right at all. PCRE does not allow closing square brackets in POSIX class
15 +names.
17 Arguments:
18 ptr pointer to the initial [
19 @@ -2314,6 +2319,7 @@
20 {
21 if (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
22 ptr++;
23 + else if (*ptr == CHAR_RIGHT_SQUARE_BRACKET) return FALSE;
24 else
25 {
26 if (*ptr == terminator && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)