Nilorea Library
C utilities for networking, threading, graphics
|
Data Structures | |
struct | N_PCRE |
N_PCRE structure. More... | |
Functions | |
int | npcre_clean_match (N_PCRE *pcre) |
clean the match list of the last capture, if any More... | |
int | npcre_delete (N_PCRE **pcre) |
Free a N_PCRE pointer. More... | |
int | npcre_match (char *str, N_PCRE *pcre) |
Return TRUE if str matches regexp, and make captures up to max_cap. More... | |
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 automatic callouts PCRE_BSR_ANYCRLF \R matches only CR, LF, or CRLF PCRE_BSR_UNICODE \R matches all Unicode line endings PCRE_CASELESS Do caseless matching PCRE_DOLLAR_ENDONLY $ not to match newline at end PCRE_DOTALL . More... | |
struct N_PCRE |
N_PCRE structure.
int npcre_clean_match | ( | N_PCRE * | pcre | ) |
clean the match list of the last capture, if any
pcre | The N_PCRE regexp holder |
Definition at line 144 of file n_pcre.c.
References __n_assert.
Referenced by npcre_match().
int npcre_delete | ( | N_PCRE ** | pcre | ) |
Free a N_PCRE pointer.
pcre | The N_PCRE regexp holder |
Definition at line 107 of file n_pcre.c.
References __n_assert, Free, and FreeNoLog.
Referenced by load_config_file(), and npcre_new().
int npcre_match | ( | char * | str, |
N_PCRE * | pcre | ||
) |
Return TRUE if str matches regexp, and make captures up to max_cap.
pcre | The N_PCRE regexp holder |
str | String to test against the regexp |
Definition at line 165 of file n_pcre.c.
References __n_assert, LOG_DEBUG, n_log, and npcre_clean_match().
Referenced by load_config_file().
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 automatic callouts PCRE_BSR_ANYCRLF \R matches only CR, LF, or CRLF PCRE_BSR_UNICODE \R matches all Unicode line endings PCRE_CASELESS Do caseless matching PCRE_DOLLAR_ENDONLY $ not to match newline at end PCRE_DOTALL .
matches anything including NL PCRE_DUPNAMES Allow duplicate names for subpatterns PCRE_EXTENDED Ignore white space and # comments PCRE_EXTRA PCRE extra features (not much use currently) PCRE_FIRSTLINE Force matching to be before newline PCRE_JAVASCRIPT_COMPAT JavaScript compatibility PCRE_MULTILINE ^ and $ match newlines within data PCRE_NEWLINE_ANY Recognize any Unicode newline sequence PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline sequences PCRE_NEWLINE_CR Set CR as the newline sequence PCRE_NEWLINE_CRLF Set CRLF as the newline sequence PCRE_NEWLINE_LF Set LF as the newline sequence PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren- theses (named ones available) PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16 validity (only relevant if PCRE_UTF16 is set) PCRE_NO_UTF32_CHECK Do not check the pattern for UTF-32 validity (only relevant if PCRE_UTF32 is set) PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8 validity (only relevant if PCRE_UTF8 is set) PCRE_UCP Use Unicode properties for backslash-d, backslash-w, etc. PCRE_UNGREEDY Invert greediness of quantifiers PCRE_UTF16 Run in pcre16_compile() UTF-16 mode PCRE_UTF32 Run in pcre32_compile() UTF-32 mode PCRE_UTF8 Run in pcre_compile() UTF-8 mode
make a ne N_PCRE object with given paramters
str | The string containing the regexp |
max_cap | Maximum number of captures. str The string containing the regexp |
flags | pcre_compile flags |
Definition at line 59 of file n_pcre.c.
References __n_assert, LOG_ERR, Malloc, n_log, and npcre_delete().
Referenced by load_config_file().