CARVIEW |
Select Language
HTTP/2 200
date: Tue, 29 Jul 2025 03:46:44 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"faa4e2f7ed1b1a5b49187773df812ce2"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=Ostu5iTeSWRPPpAzbsptGs9g%2FLfgPCgA8tq6%2FG2mi5qace6c7YkbQv2VUFYOGQtRpHI6otIWrJ%2BkpjkkK64DJL3hyb%2FWtk624DYwUbp4mYWCerYfUzQOahuv0YWzypgClz%2FRzO5sTCIHIk8hwc5kHWeb93g3XUr5BZXf%2FGzFRLalubEMeTYKlmrZZapX%2FIRxExBtXTchigt45Kh20dpU2qN2Z0c9zzYswUlO%2FEBIA%2F7103I%2FG3d4%2FKMJ2nDJrtx24RIEAilpYJ2qJFmwmi7zAA%3D%3D--tiCVHSPmGurWKDzc--l9Zr1HxDuFKLc%2BOfn0uucA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.292695617.1753760803; Path=/; Domain=github.com; Expires=Wed, 29 Jul 2026 03:46:43 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Wed, 29 Jul 2026 03:46:43 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: AF66:27E537:24F829:358EB1:68884423
GitHub - garyhouston/regexp.old: Henry Spencer's old regular expression library, also known as the book regex library, circa 1986.
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 31
Henry Spencer's old regular expression library, also known as the book regex library, circa 1986.
garyhouston/regexp.old
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a revision of my well-known regular-expression package, regexp(3). It gives C programs the ability to use egrep-style regular expressions, and does it in a much cleaner fashion than the analogous routines in SysV. It is not, alas, fully POSIX.2-compliant; that is hard. (I'm working on a full reimplementation that will do that.) This version is the one which is examined and explained in one chapter of "Software Solutions in C" (Dale Schumacher, ed.; AP Professional 1994; ISBN 0-12-632360-7), plus a couple of insignificant updates, plus one significant bug fix (done 10 Nov 1995). Although this package was inspired by the Bell V8 regexp(3), this implementation is *NOT* AT&T/Bell code, and is not derived from licensed software. Even though U of T is a V8 licensee. This software is based on a V8 manual page sent to me by Dennis Ritchie (the manual page enclosed here is a complete rewrite and hence is not covered by AT&T copyright). I admit to some familiarity with regular-expression implementations of the past, but the only one that this code traces any ancestry to is the one published in Kernighan & Plauger's "Software Tools" (from which this one draws ideas but not code). Simplistically: put this stuff into a source directory, inspect Makefile for compilation options that need changing to suit your local environment, and then do "make". This compiles the regexp(3) functions, builds a library containing them, compiles a test program, and runs a large set of regression tests. If there are no complaints, then put regexp.h into /usr/include, add regexp.o, regsub.o, and regerror.o into your C library (or put libre.a into /usr/lib), and install regexp.3 (perhaps with slight modifications) in your manual-pages directory. The files are: COPYRIGHT copyright notice README this text Makefile instructions to make everything regexp.3 manual page regexp.h header file, for /usr/include regexp.c source for regcomp() and regexec() regsub.c source for regsub() regerror.c source for default regerror() regmagic.h internal header file try.c source for test program timer.c source for timing program tests test list for try and timer This implementation uses nondeterministic automata rather than the deterministic ones found in some other implementations, which makes it simpler, smaller, and faster at compiling regular expressions, but slower at executing them. Many users have found the speed perfectly adequate, although replacing the insides of egrep with this code would be a mistake. This stuff should be pretty portable, given an ANSI C compiler and appropriate option settings. There are no "reserved" char values except for NUL, and no special significance is attached to the top bit of chars. The string(3) functions are used a fair bit, on the grounds that they are probably faster than coding the operations in line. Some attempts at code tuning have been made, but this is invariably a bit machine-specific. This distribution lives at ftp://ftp.zoo.toronto.edu/pub/bookregexp.{tar|shar} at present.
About
Henry Spencer's old regular expression library, also known as the book regex library, circa 1986.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
You can’t perform that action at this time.