Re: [pcre-dev] (no subject)

Góra strony
Delete this message
Autor: ph10
Data:  
Dla: swati upadhyaya
CC: pcre-dev
Temat: Re: [pcre-dev] (no subject)
On Wed, 9 Jul 2014, swati upadhyaya wrote:

> hi,
> I am compiling
> <<((?:\\[<:>]|[^<:>])+?)(?<!\\):((?:\\[<:>]|[^<:>])+?)(?<!\\):((?:\\[<:>]|[^<:>])+?)(?<!\\)>((?:\\[<:>]|[^<:>])*)(\\\?)?(?<!\\)>
> with pcre_compile its giving me error missing ). but when i am using the
> same pattern with the link http://regex101.com/r/mH7iW6/2#python against
> the subject sting
> "Info;<<words:=:all>;>"
> its giving me the correct result what i want..
> So why is its showing compilation error ?


I cannot reproduce this error when trying your pattern in pcretest 8.35.
Which release of PCRE are you using?

> my code is
>
> const char* pattern =
> "<<((?:\\[<:>]|[^<:>])+?)(?<!\\):((?:\\[<:>]|[^<:>])+?)(?<!\\):((?:\\[<:>]|[^<:>])+?)(?<!\\)>((?:\\[<:>]|[^<:>])*)(\\\?)?(?<!\\)>";
> pcre* re = pcre_compile(pattern,0,&error,&erroffset,NULL);
>
> if (re == NULL){
> cout << "PCRE compilation failed at offset " << erroffset << error <<
> endl;
> return NULL;
> }


That, I guess, is C++ (because of the use of cout). I am not a C++ user.
Does C++ modify strings somehow?

Philip

--
Philip Hazel