Re: [pcre-dev] question usage of pcre_exec

Page principale
Supprimer ce message
Auteur: Zoltán Herczeg
Date:  
À: t t
CC: pcre-dev@exim.org
Sujet: Re: [pcre-dev] question usage of pcre_exec
Hi,

you need to use capturing brackets or MARK control verbs to get info about the match. I think MARK is more convenient, since you don't need to iterate over the ovector. Instead you can simply read the mark pointer in the extra data.

Regards,
Zoltan

t t <russ_9457@???> írta:
>Hello,
>    at first, I'd like to thank you for your library, it is a very effective product.
>    However, I have a question about use,
>    when you execute a pcre_exec, es Can you find the pattern that matches the desired chain?

>
>    example

>
>            str = "aaa*|bbb*|ccc*"
>            regexp = pcre_compile(str.....)

>
>            retcode = pcre_exec(regexp,..."bbbTEST")

>
>       thah it is possible to found with "retcode" that the string "aaaTEST" corresponds to the pattern "bbb*"

>
>    thank you for your help

>
>                       
>--
>## List details at https://lists.exim.org/mailman/listinfo/pcre-dev