Design
regexp.txt
Associated article: Regular Expressions
Tags: Design
Published source code accompanying the article by Brian W. Kernighan and Rob Pike in which they examine regular expressions, one of the most broadly applicable of programmer's tools. Regular expressions provide a compact and expressive notation for describing patterns of text. They are also algorithmically interesting, easy to implement, and highly useful. Also see REGEXP.ZIP.
Regular Expressions
by Brian W. Kernighan and Rob Pike
Example 1:
/* match: search for re anywhere in text */
int match(char *re, char *text)
{
if (re[0] == '^')
return matchhere(re+1, text);
do { /* must look at empty string */
if (matchhere(re, ...


