#include "apr.h"
データ構造 | |
struct | ap_regex_t |
struct | ap_regmatch_t |
マクロ定義 | |
#define | AP_REG_ICASE 0x01 |
#define | AP_REG_NEWLINE 0x02 |
#define | AP_REG_NOTBOL 0x04 |
#define | AP_REG_NOTEOL 0x08 |
#define | AP_REG_EXTENDED (0) |
#define | AP_REG_NOSUB (0) |
列挙型 | |
enum | { AP_REG_ASSERT = 1, AP_REG_ESPACE, AP_REG_INVARG, AP_REG_NOMATCH } |
関数 | |
int | ap_regcomp (ap_regex_t *preg, const char *regex, int cflags) |
int | ap_regexec (const ap_regex_t *preg, const char *string, apr_size_t nmatch, ap_regmatch_t *pmatch, int eflags) |
apr_size_t | ap_regerror (int errcode, const ap_regex_t *preg, char *errbuf, apr_size_t errbuf_size) |
void | ap_regfree (ap_regex_t *preg) |
anonymous enum |
int ap_regcomp | ( | ap_regex_t * | preg, | |
const char * | regex, | |||
int | cflags | |||
) |
Compile a regular expression.
preg | Returned compiled regex | |
regex | The regular expression string | |
cflags | Must be zero (currently). |
apr_size_t ap_regerror | ( | int | errcode, | |
const ap_regex_t * | preg, | |||
char * | errbuf, | |||
apr_size_t | errbuf_size | |||
) |
Return the error code returned by regcomp or regexec into error messages
errcode | the error code returned by regexec or regcomp | |
preg | The precompiled regex | |
errbuf | A buffer to store the error in | |
errbuf_size | The size of the buffer |
int ap_regexec | ( | const ap_regex_t * | preg, | |
const char * | string, | |||
apr_size_t | nmatch, | |||
ap_regmatch_t * | pmatch, | |||
int | eflags | |||
) |
Match a NUL-terminated string against a pre-compiled regex.
preg | The pre-compiled regex | |
string | The string to match | |
nmatch | Provide information regarding the location of any matches | |
pmatch | Provide information regarding the location of any matches | |
eflags | Bitwise OR of any of AP_REG_* flags |
void ap_regfree | ( | ap_regex_t * | preg | ) |
Destroy a pre-compiled regex.
preg | The pre-compiled regex to free. |