Nilorea Library pcre api test.
Nilorea Library pcre api test
- Author
- Castagnier Mickael
- Version
- 1.0
- Date
- 04/12/2019
int main(int argc, char** argv) {
if (argc < 3) {
n_log(
LOG_ERR,
"Not enough args\nUsage:\n %s \"regexp\" \"string\"", argv[0]);
exit(1);
}
int it = 0;
it++;
}
}
} else {
}
exit(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
int captured
flag for match_list cleaning
const char ** match_list
populated match list if nPcreCapMatch is called
N_PCRE * npcre_new(char *str, int max_cap, int flags)
From pcre doc, the flag bits are: PCRE_ANCHORED Force pattern anchoring PCRE_AUTO_CALLOUT Compile aut...
int npcre_match(char *str, N_PCRE *pcre)
Return TRUE if str matches regexp, and make captures up to max_cap.
int npcre_delete(N_PCRE **pcre)
Free a N_PCRE pointer.
PCRE helpers for regex matching.