Olivier Nicole schrieb:
Hi,

I must missunderstand how to use regex(3).
no, you're misunderstanding regoff_t or printf.
it's a 64 bit type. thus your printf should read:

ret=regexec(preg, string, nmatch, pmatch, 0);
printf("return from regexec=%d\nnmatch=%d\np0.so=%lld p0.eo=%lld\np1.so=%lld
        p1.eo=%lld\np2.so=%lld p2.eo=%lld\np3.so=%lld p3.eo=%lld\n",
                ret, nmatch,
                pmatch[0].rm_so, pmatch[0].rm_eo,
                pmatch[1].rm_so, pmatch[1].rm_eo,
                pmatch[2].rm_so, pmatch[2].rm_eo,
                pmatch[3].rm_so, pmatch[3].rm_eo );

regards
titus
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to