grblHAL core  20241107
regex.h
Go to the documentation of this file.
1 // regex.h - A Regular Expression Matcher
2 //
3 // Code by Rob Pike, exegesis by Brian Kernighan
4 //
5 // http://genius.cat-v.org/brian-kernighan/articles/beautiful
6 //
7 // c matches any literal character c
8 // . matches any single character
9 // ^ matches the beginning of the input string
10 // $ matches the end of the input string
11 // * matches zero or more occurrences of the previous character
12 
13 #pragma once
14 
15 /* match: search for regexp anywhere in text */
16 int match(char *regexp, char *text);
17 
18 /* matchhere: search for regexp at beginning of text */
19 int matchhere(char *regexp, char *text);
20 
21 /* matchstar: search for c*regexp at beginning of text */
22 int matchstar(int c, char *regexp, char *text);
int matchstar(int c, char *regexp, char *text)
Definition: regex.c:42
int match(char *regexp, char *text)
Definition: regex.c:16
int matchhere(char *regexp, char *text)
Definition: regex.c:28