Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ds26gte/pregexp
https://github.com/ds26gte/pregexp
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ds26gte/pregexp
- Owner: ds26gte
- License: other
- Created: 2014-08-22T16:27:38.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-01-16T03:24:46.000Z (10 months ago)
- Last Synced: 2024-05-23T04:48:50.056Z (6 months ago)
- Language: Scheme
- Size: 54.7 KB
- Stars: 27
- Watchers: 7
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.adoc
- Changelog: history
- License: COPYING
Awesome Lists containing this project
README
= pregexp
pregexp is a portable implementation of regular expressions
(regexps) that runs in any R5RS- or R4RS-compliant implementation
of the programming language Scheme, and in Common Lisp. The regexp
notation supported is compatible with Perl’s, and includes such
powerful directives as- numeric quantifiers
- non-greedy quantifiers
- POSIX character classes
- non-capturing clusters (in addition to the usual capturing kind)
- selective (i.e., per-cluster) case-insensitivity
- selective space-insensitivity (with provision for comments)
- backreferences
- alternation
- backtrack pruning
- lookahead (positive and negative)
- lookbehind (positive and negative)This is in addition to the more basic directives
familiar to all regexp users.== For Scheme
Simply load the file `pregexp.scm` into your Scheme.
Alternatively, if your dialect allows it, you can install pregexp
as a module — consult the file
link:INSTALL.adoc[].However you load pregexp, you will now have access to the
procedures- `pregexp`
- `pregexp-match-positions`
- `pregexp-match`
- `pregexp-split`
- `pregexp-replace`
- `pregexp-replace*`The use of these procedures is described fully and with examples
in the pregexp manual.== For Common Lisp
`pregexp.lisp` is a Common Lisp implementation of the same
routines as in `pregexp.scm`, with the same behavior (modulo
transparent stuff like `nil` being the CL equivalent of `#f`).== Documentation
The pregexp manual is at
http://ds26gte.github.io/pregexp/index.html.❧❧❧
—Dorai Sitaram