--- code/trunk/pcre_dfa_exec.c 2007/03/05 12:36:47 97 +++ code/trunk/pcre_dfa_exec.c 2007/03/26 16:00:17 134 @@ -6,7 +6,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2006 University of Cambridge + Copyright (c) 1997-2007 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -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++; } }