i3
regex.h
Go to the documentation of this file.
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
6  *
7  * regex.c: Interface to libPCRE (perl compatible regular expressions).
8  *
9  */
10 #ifndef I3_REGEX_H
11 #define I3_REGEX_H
12 
23 struct regex *regex_new(const char *pattern);
24 
29 void regex_free(struct regex *regex);
30 
37 bool regex_matches(struct regex *regex, const char *input);
38 
39 #endif
char * pattern
Definition: data.h:201
void regex_free(struct regex *regex)
Frees the given regular expression.
Definition: regex.c:61
struct regex * regex_new(const char *pattern)
Creates a new 'regex' struct containing the given pattern and a PCRE compiled regular expression...
Definition: regex.c:24
bool regex_matches(struct regex *regex, const char *input)
Checks if the given regular expression matches the given input and returns true if it does...
Definition: regex.c:75
Regular expression wrapper.
Definition: data.h:200