Concept:RegularExpressionMost Scheme implementations come with some sort of
regular expression matcher, but the interface varies a lot.
- The language it accepts: POSIX, GNU regex library, Perl-compatible
library, SRE, or original.
- Whether it has disjoint regexp object, or
just uses string to represent regexp.
- The return type of match. substring? indexes? or a special
match object?
- If it has regexp object, whether it supports literal representation
of regexp or not.
- Procedure names to match.
- language: built by funcional style
- regexp object: Yes (mixed with character set object)
- return type of match:
- API: set, range, ranges, ascii-range, ascii-ranges,
negate, intersection, union, subtract, lower-case,
upper-case, alphabetic, numeric, alphanumeric,
punctuation, graphic, printing, control, blank,
whitespace, hexdigit, string-start, string-end,
sequence, one-of, text, repeat, ignore-case,
use-case, submatch, no-submatches, any-match?,
exact-match?, match, match-start, match-end,
match-submatches
- language: original (similar to POSIX, with some restrictions and
extensions).
- regexp object: Yes
- return type of match: regmatch object
- literal representation: #/regexp/, see #/.
- API: regexp?,
string->regexp, rxmatch, rxmatch-start, rxmatch-end,
rxmatch-substring, rxmatch-before, rxmatch-after, rxmatch-if,
rxmatch-let, rxmatch-cond, rxmatch-case, regexp-replace,
regexp-replace-all, regexp-quote
- language: egrep, Perl-compatible
- regexp object: Yes
- return type of match: substring, indexes.
- literal representation: #rx"regexp" (regexp), #rx#"regexp" (byte-regexp), #px"regexp" (pregexp), #px#"regexp" (byte-pregexp)
- API: regexp?, pregexp?, regexp?, pregexp??,
byte-regexp?, byte-pregexp?, byte-regexp??, byte-pregexp??,
regexp-match, regexp-match-positions, regexp-match??,
regexp-match-peek?, regexp-match-peek-positions?,
regexp-match-peek-immediate?, regexp-match-peek-positions-immediate?,
regexp-replace, regexp-replace*?
- langauge: JavaScript (except no spaces inside)
- regexp object: Yes
- literal expressions: /foo|bar/
- API: match, search, split functions or invoking methods on strings with --> macro like in Javascript
|