--- code/trunk/pcre_dfa_exec.c 2007/03/09 15:59:06 117 +++ code/trunk/pcre_dfa_exec.c 2007/03/26 15:09:47 130 @@ -2308,6 +2308,15 @@ { while (current_subject <= end_subject && !WAS_NEWLINE(current_subject)) current_subject++; + + /* If we have just passed a CR and the newline option is ANY, and we + are now at a LF, advance the match position by one more character. */ + + if (current_subject[-1] == '\r' && + md->nltype == NLTYPE_ANY && + current_subject < end_subject && + *current_subject == '\n') + current_subject++; } }