An update to the new Regular Expression API (added 7/29/04)

In June, we released a new, fast, Perl-compatible regular expression
matcher module. It is described in this essay. We have now released an
update to that module, with a new function and three new macros. In
this essay, we briefly describe this new functionality.

You should download the new module with
sys:update-allegro. You should evaluate (require :regexp2)
to load the module. The documentation has been updated, see regexp.htm. The new
regexp module and the additional functionality are described in The new
regexp2 module in that document.

The function re-submatch

Arguments:regexp string indexes selector &key
(type :string)

This function is an efficient way to deal with submatches in a regular
expression, in the event that not all submatches will be used by the
caller of match-re, the function that find the matches. In the
following example, the submatch string is not created until the call
to re-submatch: