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 #pragma once
11 
22 struct regex *regex_new(const char *pattern);
23 
28 void regex_free(struct regex *regex);
29 
36 bool regex_matches(struct regex *regex, const char *input);
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
void regex_free(struct regex *regex)
Frees the given regular expression.
Definition: regex.c:61
Regular expression wrapper.
Definition: data.h:215
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
char * pattern
Definition: data.h:216