[pcre-dev] DOT with (PCRE_DOTALL|PCRE_NEWLINE_ANY) is a unex…

Página Principal
Apagar esta mensagem
Autor: Issaana
Data:  
Para: pcre-dev
Assunto: [pcre-dev] DOT with (PCRE_DOTALL|PCRE_NEWLINE_ANY) is a unexpected result
Hello,

I tried the following code.

re=pcre_compile("a.b",PCRE_DOTALL|PCRE_NEWLINE_ANY,&err,&erroff,NULL);
rc=pcre_exec(re,NULL,"a\nb", 3,0,0,ov,3); //(A) rc=1
rc=pcre_exec(re,NULL,"a\r\nb",4,0,0,ov,3); //(B) rc=PCRE_ERROR_NOMATCH

(B) is a unexpected result. Which of a bug or my misunderstanding is it?

Thanks,
Issaana