[pcre-dev] my 1st try to compil pcre.. need advice

Page principale
Supprimer ce message
Auteur: Thierry Douez
Date:  
À: pcre-dev
Sujet: [pcre-dev] my 1st try to compil pcre.. need advice
H
​ello all,

I've just managed to compil pcre as a static library to be integrated in a
tool.

So far, so good. I could run few regex without any problems.

Now, I want to use the Unicode functionnality and I'm lost.

So, I have a couple of regex to work with:

1st)
RE:                     "^\w+\K:\s+\d+"
SUBJECT:          "FOOBAR:      42"
REPLACETEXT: "(Ok)"


RESULT:              FOOBAR(Ok)


2nd)
RE:                     "(*UCP)^\w+\K:\s+\d+"
SUBJECT:          "abcdéfgh:      55"
REPLACETEXT: "(Ok)"


RESULT:              abcdéfgh(Ok)


The first always works.
The second has a 'e' with an accent in the middle of the subject
and I can't manage to make it work.

In config.h, if I set:

#define SUPPORT_UCP 1

the regex is fine (no error) but doesn't match.

If #undef SUPPORT_UCP
then I get an error in the regex.



Is there something else I have to do in config.h ?
Or do I miss the obvious?

Thanks for any hint

Regards,

Thierry