On Fri, 9 Oct 2009, Sheri wrote:
> Gernot Frisch wrote:
> > Hi,
> >
> > I'm going insane.
> >
> > I tried the DLL with LoadLobrary/GetProcAddress like this:
> >
> > int output[66];
> > memset(output, 0xff, sizeof(output));
> > const char* error;
> > int erroffset;
> > int ierr = 0;
> > pcre* pRE = pcre_compile2("(<[^>]+>)", 0
> > , &ierr, &error
> > , &erroffset, NULL);
> > if(pRE)
> > {
> > int output[66];
> > const char* pSubj = "28:Sep:2009 xxx@???"
> > " 33 44 45 56 <START>"
> > " <HEAD> </HEAD> </START>";
> > int ok = pcre_exec(pRE, 0
> > , pSubj, (int)strlen(pSubj)
> > , 0, 0
> > , output, 66);
> > // ok==2; output is:
> > // {36, 43, 36, 43, -1, -1, -1, -1, .... }
> > }
> >
> >
> > What did I do wrong? I built the latest version with mingw.
> How does it differ from expectation?
Good Question! However, I have a guess that perhaps you should try +?
instead of + in your pattern.
Philip
--
Philip Hazel