![]() |
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 | |
| int | npcre_delete (N_PCRE **pcre) |
| Free a N_PCRE pointer. | |
| int | npcre_match (char *str, N_PCRE *pcre) |
| Return TRUE if str matches regexp, and make captures up to max_cap. | |
| 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 . | |
| struct N_PCRE |
N_PCRE structure.
Collaboration diagram for N_PCRE:| 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 132 of file n_pcre.c.
References __n_assert, N_PCRE::captured, and N_PCRE::match_list.
Referenced by main(), and npcre_match().
Here is the caller graph for this function:| int npcre_delete | ( | N_PCRE ** | pcre | ) |
Free a N_PCRE pointer.
| pcre | The N_PCRE regexp holder |
Definition at line 102 of file n_pcre.c.
References __n_assert, Free, and FreeNoLog.
Referenced by load_config_file(), main(), main(), and npcre_new().
Here is the caller graph for this function:| 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 150 of file n_pcre.c.
References __n_assert, N_PCRE::captured, N_PCRE::extra, LOG_DEBUG, N_PCRE::match_list, n_log, npcre_clean_match(), N_PCRE::ovecount, N_PCRE::ovector, N_PCRE::regexp, and N_PCRE::regexp_str.
Referenced by load_config_file(), main(), and main().
Here is the call graph for this function:
Here is the caller graph for this function:| 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
new N_PCRE object with given parameters
| 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, N_PCRE::captured, N_PCRE::extra, LOG_ERR, Malloc, N_PCRE::match_list, n_log, npcre_delete(), N_PCRE::ovecount, N_PCRE::ovector, N_PCRE::regexp, and N_PCRE::regexp_str.
Referenced by load_config_file(), main(), and main().
Here is the call graph for this function:
Here is the caller graph for this function: