• Home
Name Date Size #Lines LOC

..--

COPYRIGHTD22-Oct-2025956 2115

MakefileD22-Oct-20252.9 KiB12680

READMED22-Oct-20252.2 KiB7756

WHATSNEWD22-Oct-20257.3 KiB140116

debug.cD22-Oct-20254.8 KiB241223

debug.ihD22-Oct-2025329 1512

engine.cD22-Oct-202524.1 KiB1,011876

engine.ihD22-Oct-20251.3 KiB3633

librxspencer.defD22-Oct-202541 65

main.cD22-Oct-202511.7 KiB545459

main.ihD22-Oct-2025500 2017

mkhD22-Oct-20251.8 KiB7761

regcomp.cD22-Oct-202536.9 KiB1,7201,369

regcomp.ihD22-Oct-20252.6 KiB5249

regerror.cD22-Oct-20252.4 KiB7868

regerror.ihD22-Oct-2025267 1310

regex.hD22-Oct-20251.6 KiB6657

regex2.hD22-Oct-20255.1 KiB13379

regexec.cD22-Oct-20253.8 KiB13197

regfree.cD22-Oct-2025658 3627

rxspencer.3D22-Oct-202514.6 KiB510506

rxspencer.7D22-Oct-20259.5 KiB236235

split.cD22-Oct-20256.8 KiB320273

testsD22-Oct-202512 KiB478457

utils.hD22-Oct-2025500 2317

README

1This is a modified version of Henry Spencer's "BSD" regular expression
2library. The original library can be found at
3https://github.com/garyhouston/regex.  A description of Spencer's
4various libraries can be found at https://garyhouston.github.io/regex/
5
6The changes in this version are:
7
8* The library name has been changed to rxspencer, the header installs
9  into a directory rxspencer, and the man pages named accordingly, to
10  allow easy installation as a system library on Linux without
11  conflicting with other regex libraries.
12* A CMake build system, which can build either static or shared
13  libraries, maybe even on non-Unix systems.
14* A few code modernizations and changes to improve portabilty, avoid
15  compiler warnings, and improve robustness.
16
17I (Gary Houston) originally made this version with a build system
18based on GNU Automake and Libtool, to allow building a shared library
19for a project where the library needed to be dynamically loaded. The
20CMake scripts were contributed by Stephen Just, modified from LuaDist
21versions.
22
23Spencer's original license can be found in the COPYRIGHT file. The CMake
24scripts are licensed under the MIT license. I release all of my own
25changes to the public domain under the Creative Commons Zero license.
26
27Installation
28============
29
30CMake needs to be installed. To build from a Linux command line, or
31something compatible, within the source directory:
32
33to configure for a static library:
34cmake .
35or
36cmake -Drxshared=0 .
37
38to configure for a shared library:
39cmake -Drxshared=1 .
40
41to disable tests:
42cmake -DBUILD_TESTING=OFF .
43
44to disable manuals/ documentation:
45cmake -DINSTALL_DOCS=OFF .
46
47to build:
48make
49make install
50
51also required on Linux, after installing the shared library:
52ldconfig
53
54to run the tests:
55make test
56
57to run the tests, with output displayed:
58ctest -V
59
60Usage
61=====
62
63Include the following header in a C program:
64
65#include <rxspencer/regex.h>
66
67Link with the library using the -lrxspencer flag, as in:
68gcc test.c -o test -lrxspencer
69
70The library is further described in the supplied man pages: rxspencer.3
71and rxspencer.7, which are formatted at
72https://garyhouston.github.io/regex/regex3.html and
73https://garyhouston.github.io/regex/regex7.html.
74
75--
76Gary Houston,  ghouston@arglist.com
77