Notes about the WIN32 port of REGEX packages

Regular expressions are a neat way to describe and find patterns in strings. This functionality is often available only in specialized text editing or programming languages.

Finding no ready-packaged REGEX implementation for WIN32 environments the author located two popular implementations for Unix and ported them.

Either one of these libraries provides a POSIX style regular expression compilation and execution facility suitable for use with C and C++ programs.

  1. The Free Software Foundation gnu_regex.
  2. The Henry Spencer hs_regex as packaged with the FreeBSD libc.

In order to experiment with these packages I wrote a test_regex.c main driver, which can read input from the console or from a file. My impression is that both packages are reasonably efficient, although not as good as would be obtained with a fully optimized deterministic finite automaton , such as in Alan Bawden's code for the Zetalisp (MIT Lispmachine) READTABLE, or (I think) the Unix lex program.

Because of the pervasive/inductive copyright issue it is the hs_regex that I include with the windows compiled version of my winsiod scheme dialect of lisp interpreter.

Pointers to regular expression related material:

This file is © Copyright 1997 by George J. Carrette.