10#ifndef __WSUTIL_REGEX_H__
11#define __WSUTIL_REGEX_H__
38#define WS_REGEX_CASELESS (1U << 0)
44#define WS_REGEX_NEVER_UTF (1U << 1)
50#define WS_REGEX_ANCHORED (1U << 2)
88 const char *subj, ssize_t subj_length);
111 const char *subj, ssize_t subj_length,
112 size_t subj_offset,
size_t pos_vect[2]);
WS_DLL_PUBLIC bool ws_regex_matches(const ws_regex_t *re, const char *subj)
Matches a null-terminated subject string against a compiled regex.
Definition regex.c:144
WS_DLL_PUBLIC bool ws_regex_matches_length(const ws_regex_t *re, const char *subj, ssize_t subj_length)
Matches a subject string of specified length against a compiled regex.
Definition regex.c:151
WS_DLL_PUBLIC ws_regex_t * ws_regex_compile(const char *patt, char **errmsg)
Compiles a regular expression pattern.
Definition regex.c:100
WS_DLL_PUBLIC bool ws_regex_matches_pos(const ws_regex_t *re, const char *subj, ssize_t subj_length, size_t subj_offset, size_t pos_vect[2])
Finds the position of a match within a subject string.
Definition regex.c:170
WS_DLL_PUBLIC ws_regex_t * ws_regex_compile_ex(const char *patt, ssize_t size, char **errmsg, unsigned flags)
Compiles a regular expression with extended options.
Definition regex.c:84
WS_DLL_PUBLIC const char * ws_regex_pattern(const ws_regex_t *re)
Returns the original pattern string from a compiled regex.
Definition regex.c:202
WS_DLL_PUBLIC void ws_regex_free(ws_regex_t *re)
Frees a compiled regex object.
Definition regex.c:193