FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.0
Minimally revised from 7.0.

match-re

Arguments: regexp input &key return case-fold single-line multiple-lines ignore-whitespace start end back-end

regexp must be a string specifying a regular expression, or a compiled regular expression (an object returned by compile-re). This function tries to match the string input with the regexp. If they do not match, nil is returned as the single returned value. If they match, t is returned as a first value, and the match result of the whole, submatch 1, submatch 2, ... are returned as the other values.

The way of returning match result can be specified by the return keyword argument. If it is :string (the default), substrings of input are returned. If it is :index, a cons of start and end index within input is returned for each match.

The keyword argument start and end limits the region of input.

The keyword argument case-fold and back-end are passed to the compile-re function, when a string is given as the value of regexp. They are ignored when regexp is a compiled regular expression. The default value of back-end is regexp:vm.

A compiler-macro is defined for this function. If regexp is a literal string, compile-re is called at compilation time, so you do not need to pay the cost of regexp compilation at run-time.

See The new regexp2 module in regexp.htm for further information on this function and the regexp2 module.


Copyright (c) 1998-2008, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.0. has had minimal revisions compared to the 7.0 page.
Created 2007.4.30.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.0
Minimally revised from 7.0.