FunctionPackage: exclToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 7.0
This page is new in 7.0.

replace-re

Arguments: string regexp substitution &key count (start 0) end case-fold single-line multiple-lines ignore-whitespace

This function replaces substrings in string that matches regexp with substitution, returning the new string. It always returns a new string, even if no substitutions are made.

regexp can be a string that specifies a regular expression, or an already-compiled (by compile-re) regular expression. regexp should match a non-zero length string, or an error is signaled.

substitution can be a string, or a function that takes one argument, a list of match substrings returned by the regexp matcher. The function must return a string, which is then used as a substitution string.

The keyword argument count limits the maximum number of substitutions. If it is nil, all occurrences of regexp in string are replaced.

The keyword arguments start and end limit the region in string where matching occurs.

Other keyword arguments are passed to compile-re to compile regexp.

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.

ToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 7.0
This page is new in 7.0.