5 Struct N_PCRE
gullradriel edited this page 2026-10-09 00:55:18 +02:00

N_PCRE

Module: PCREs: regex matching helpers

N_PCRE structure.

#include "n_pcre.h"

Public Attributes

Name
pthread_rwlock_t rwlock
rwlock protecting match_data, match_list, and captured
char * regexp_str
original regexp string
pcre2_code * regexp
regexp
PCRE2_UCHAR8 ** match_list
populated match list (NULL-terminated) after npcre_match_capture() Allocated by PCRE2 via pcre2_substring_list_get() and must be freed with pcre2_substring_list_free().
pcre2_match_data * match_data
match data storage (ovector, etc.)
int captured
flag for match_list cleaning

Public Attributes Documentation

variable rwlock

pthread_rwlock_t rwlock;

rwlock protecting match_data, match_list, and captured

variable regexp_str

char * regexp_str;

original regexp string

variable regexp

pcre2_code * regexp;

regexp

variable match_list

PCRE2_UCHAR8 ** match_list;

populated match list (NULL-terminated) after npcre_match_capture() Allocated by PCRE2 via pcre2_substring_list_get() and must be freed with pcre2_substring_list_free().

variable match_data

pcre2_match_data * match_data;

match data storage (ovector, etc.)

variable captured

int captured;

flag for match_list cleaning