i3
regex.h
Go to the documentation of this file.
1/*
2 * vim:ts=4:sw=4:expandtab
3 *
4 * i3 - an improved tiling window manager
5 * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
6 *
7 * regex.c: Interface to libPCRE (perl compatible regular expressions).
8 *
9 */
10#pragma once
11
12#include <config.h>
13
24struct regex *regex_new(const char *pattern);
25
30void regex_free(struct regex *regex);
31
38bool regex_matches(struct regex *regex, const char *input);
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:62
void regex_free(struct regex *regex)
Frees the given regular expression.
Definition regex.c:47
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:22
Regular expression wrapper.
Definition data.h:280
char * pattern
Definition data.h:281