All Manuals > LispWorks User Guide and Reference Manual > 40 The LISPWORKS Package

NextPrevUpTopContentsIndex

precompile-regexp

Function
Summary

Precompiles a regular expression object.

Package

lispworks

Signature

precompile-regexp string &key case-sensitive error-function => pattern, condition-designators

Arguments

string

A string.

case-sensitive

A generalized boolean.

error-function

nil or a function that takes arguments like error.

Values

pattern

A precompiled regular expression object.

condition-designators - A list.

Description

The function precompile-regexp returns a precompiled regular expression object suitable for passing as pattern to functions like find-regexp-in-string.

case-sensitive controls whether string is precompiled as a case sensitive or case insensitive search. A non-nil value means a case sensitive pattern. The value nil (the default) means a case insensitive pattern.

error-function is used when the string is not a legal regular expression. In this case, if error-function is not nil, it is applied to a list of arguments which are designators for a condition like the arguments that error takes. If error-function is nil, precompile-regexp returns nil as the first argument and the list of arguments as a second return value, condition-designators. error-function defaults to error.

Notes

For the regular expression syntax, see find-regexp-in-string.

See also

find-regexp-in-string
regexp-find-symbols
count-regexp-occurrences
editor:regular-expression-search


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex