| Allegro CL version 7.0 This page is new in 7.0. | |||||||||
Arguments: string &key case-fold ignore-whitespace multiple-lines single-line (return :unknown) back-end
Given a string that describes a regular expression, creates a compiled regular expression object.
The keyword argument case-fold controls whether the result matcher becomes case-sensitive or not by default. (The 'i' flag of Perl RE).
If the keyword argument ignore-whitespace is given and true, whitespace characters within string are ignored as regexp spec. (The 'x' flag of Perl RE).
If the keyword argument multiple-lines is given and true, the created matcher recognizes multiple lines, i.e. ^ and $ matches beginning and end of individual lines. Without this argument, ^ and $ matches only beginning and end of the input string. (The 'm' flag of Perl RE).
If the keyword argument single-line is given and true, '.' will match any character including newline. Without single-line, '.' matches any character except newline. (The 's' flag of Perl RE).
The keyword argument back-end can be either
regexp:native or regexp:vm. If
it is regexp:native, the compiled regexp code is a
native code; which runs fast, but it takes more time to compile. If
it is regexp:vm (which is the default), the
compiled regexp code is an instruction sequence of a virtual machine
to match the input string.
The keyword argument return specifies how the
created matcher returns the result. If it is nil, the matcher will return only a boolean value
which indicates whether the input string matches the regexp or not.
If it is :string, the matcher also returns the
substrings of the matched region and all submatches of the input
string. If it is :index, the matcher returns pairs
of start and end indices of the matched region and all submatches. If
the keyword argument is not given at compile time, the matcher is
created so that it will accept return keyword
argument at the matching time; however, compile-re will generate more efficient code
if it knows the return type at the compile time. (The default is
:unknown, which has the effect just described.)
The actual home package of this symbol is the regexp package. It is also exported from (and documented with) the excl package.
See The new regexp2 module in regexp.htm for fuether information on this function and the regexp2 module.
Copyright (c) 1998-2006, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 7.0. This page is new in the 7.0 release.
Created 2005.9.20.
| Allegro CL version 7.0 This page is new in 7.0. | |||||||||