Next: srfi regexps compatibility, Previous: srfi regexps rationale, Up: srfi regexps [Index]
We introduce two new types, regexp
and regexp-match
,
which are disjoint from all other types. We also introduce the concept
of an “SRE”, which is not a disjoint type but is a Scheme object
following the specification described below.
SRFI-14 defines the char-set
type, which can be used as
part of an SRE.
In the prototypes below the following naming conventions imply type restrictions:
A SRFI-14 character set.
An SRE which corresponds to matching a single character out of a set of characters.
An exact, non–negative integer, defaulting to the (string-length
str)
.
A procedure ‘(lambda (i regexp-match str obj) ...)’.
Any object.
Any object.
A procedure ‘(lambda (i regexp-match str obj) ...)’.
An SRE or pre–compiled regexp object.
A regexp-match
object from a successful match.
An SRE as described below.
An exact, non–negative integer, defaulting to ‘0’.
A string.
A symbolic expression describing a substitution template.
Either an object of type ‘X’ or the #f
value.