30int main(
int argc,
char** argv) {
37 n_log(
LOG_ERR,
"Not enough args\nUsage:\n %s \"regexp\" \"string\"", argv[0]);
#define n_log(__LEVEL__,...)
Logging function wrapper to get line and func.
#define LOG_DEBUG
debug-level messages
#define LOG_ERR
error conditions
#define LOG_STDERR
internal, default LOG_TYPE
void set_log_level(const int log_level)
Set the global log level value ( static int LOG_LEVEL )
#define LOG_INFO
informational
PCRE2_UCHAR8 ** match_list
populated match list (NULL-terminated) after npcre_match_capture() Allocated by PCRE2 via pcre2_subst...
int captured
flag for match_list cleaning
N_PCRE * npcre_new(char *str, int flags)
From pcre doc, the flag bits are: PCRE_ANCHORED Force pattern anchoring PCRE_AUTO_CALLOUT Compile aut...
int npcre_match_capture(char *str, N_PCRE *pcre)
Return TRUE if str matches regexp, and make captures.
int npcre_clean_match(N_PCRE *pcre)
clean the match list of the last capture, if any
int npcre_delete(N_PCRE **pcre)
Free a N_PCRE pointer.
PCRE helpers for regex matching.