Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
regex.h
Go to the documentation of this file.
1
10#ifndef __WSUTIL_REGEX_H__
11#define __WSUTIL_REGEX_H__
12
13#include <wireshark.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19struct _ws_regex;
20typedef struct _ws_regex ws_regex_t;
21
22WS_DLL_PUBLIC ws_regex_t *
23ws_regex_compile(const char *patt, char **errmsg);
24
25#define WS_REGEX_CASELESS (1U << 0)
26/* By default UTF-8 is off. This option also prevents it from being
27 * turned on using a pattern option. */
28#define WS_REGEX_NEVER_UTF (1U << 1)
29#define WS_REGEX_ANCHORED (1U << 2)
30
31WS_DLL_PUBLIC ws_regex_t *
32ws_regex_compile_ex(const char *patt, ssize_t size, char **errmsg, unsigned flags);
33
35WS_DLL_PUBLIC bool
36ws_regex_matches(const ws_regex_t *re, const char *subj);
37
39WS_DLL_PUBLIC bool
41 const char *subj, ssize_t subj_length);
42
54WS_DLL_PUBLIC bool
56 const char *subj, ssize_t subj_length,
57 size_t subj_offset, size_t pos_vect[2]);
58
59WS_DLL_PUBLIC void
60ws_regex_free(ws_regex_t *re);
61
62WS_DLL_PUBLIC const char *
63ws_regex_pattern(const ws_regex_t *re);
64
65#ifdef __cplusplus
66}
67#endif
68
69#endif /* __WSUTIL_REGEX_H__ */
WS_DLL_PUBLIC bool ws_regex_matches(const ws_regex_t *re, const char *subj)
Definition regex.c:144
WS_DLL_PUBLIC bool ws_regex_matches_length(const ws_regex_t *re, const char *subj, ssize_t subj_length)
Definition regex.c:151
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])
Definition regex.c:170
Definition regex.c:17