--- code/trunk/pcre.c 2007/02/24 21:38:33 19 +++ code/trunk/pcre.c 2007/02/24 21:38:37 21 @@ -1008,14 +1008,20 @@ /* If the mininum is 1 and the previous item was a character string, we either have to put back the item that got cancelled if the string length was 1, or add the character back onto the end of a longer - string. For a character type nothing need be done; it will just get put - back naturally. */ + string. For a character type nothing need be done; it will just get + put back naturally. Note that the final character is always going to + get added below. */ else if (*previous == OP_CHARS) { if (code == previous) code += 2; else previous[1]++; } + /* For a single negated character we also have to put back the + item that got cancelled. */ + + else if (*previous == OP_NOT) code++; + /* If the maximum is unlimited, insert an OP_STAR. */ if (repeat_max < 0)