--- code/trunk/pcre_compile.c 2007/08/03 14:53:04 206 +++ code/trunk/pcre_compile.c 2007/08/06 15:23:29 208 @@ -2454,23 +2454,23 @@ } /* If the first character is '^', set the negation flag and skip it. Also, - if the first few characters (either before or after ^) are \Q\E or \E we + if the first few characters (either before or after ^) are \Q\E or \E we skip them too. This makes for compatibility with Perl. */ - + negate_class = FALSE; for (;;) { c = *(++ptr); if (c == '\\') { - if (ptr[1] == 'E') ptr++; + if (ptr[1] == 'E') ptr++; else if (strncmp((const char *)ptr+1, "Q\\E", 3) == 0) ptr += 3; - else break; + else break; } else if (!negate_class && c == '^') negate_class = TRUE; else break; - } + } /* Keep a count of chars with values < 256 so that we can optimize the case of just a single character (as long as it's < 256). However, For higher @@ -3075,7 +3075,7 @@ *errorcodeptr = ERR6; goto FAILED; } - + /* If class_charcount is 1, we saw precisely one character whose value is less than 256. In non-UTF-8 mode we can always optimize. In UTF-8 mode, we can optimize the negative case only if there were no characters >= 128