Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   pcrejit    ( 3 )

Perl-совместимые регулярные выражения (Perl-compatible regular expressions)

EXAMPLE CODE

This is a single-threaded example that specifies a JIT stack without using a callback.

int rc; int ovector[30]; pcre *re; pcre_extra *extra; pcre_jit_stack *jit_stack;

re = pcre_compile(pattern, 0, &error, &erroffset, NULL); /* Check for errors */ extra = pcre_study(re, PCRE_STUDY_JIT_COMPILE, &error); jit_stack = pcre_jit_stack_alloc(32*1024, 512*1024); /* Check for error (NULL) */ pcre_assign_jit_stack(extra, NULL, jit_stack); rc = pcre_exec(re, extra, subject, length, 0, 0, ovector, 30); /* Check results */ pcre_free(re); pcre_free_study(extra); pcre_jit_stack_free(jit_stack);