[pcre-dev] FW: PCRE for Windows

Top Page
Delete this message
Author: chuchiehliu
Date:  
To: pcre-dev
Subject: [pcre-dev] FW: PCRE for Windows
Hello PCRE developers,

I am trying to include PCRE library into my Windows application.
Download "Developer files" and "Binaries" from Pcre for Windows. Using
my Microsoft Visual Studio 2005 C++, based on pcredemo.c source, created
a console program and included the pcrelib, pcre3.dll, etc. files (just
try to make sure I can include PCRE library first). I managed to build
it and created "MyApps.exe". But when I tested it, it does not make
sense to me (always match). I added few printf (as below) and still
cannot tell what's wrong. NOTE: the pcre_exec return code rc is "1".
What it means? The dll is dated 27Mar2007. I tried pcretest.exe which
seems working on windows. Any suggestion/comment on - how (what should
I use) I can include PCRE library into my Microsoft Visual Studio 2005
C++ console application.

(command line screen shot dump)

C:>MyApps /abc/ 123abc456
pattern=/abc/ size=5
subject=123abc456 size=9
pcre_exec rc=1

Match succeeded at offset 0
0: 9 123abc456
No named substrings

C:>MyApps /xyz/ 123abc456
pattern=/xyz/ size=5
subject=123abc456 size=9
pcre_exec rc=1

Match succeeded at offset 0
0: 9 123abc456
No named substrings

C:>



Thanks,
Jerry