Next: , Previous: , Up: srfi regexps syntax   [Index]


2.39.7.4 Submatch Patterns

(submatch sre ...)
($ sre ...)

A numbered submatch. The contents matching the pattern will be available in the resulting regexp-match.

(submatch-named name sre ...)
(-> name sre ...)

A named submatch. Behaves just like ‘submatch’, but the field may also be referred to by name.

(backref n-or-name)

Optional: match a previously matched submatch. The feature ‘regexp-backrefs’ will be provided if this pattern is supported. Back–references are expensive, and can trivially be shown to be NP-hard, so one should avoid their use even in implementations which support them.