precompile-regexp string &key case-sensitive error-function => pattern, condition-designators
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
.
For the regular expression syntax, see find-regexp-in-string.
find-regexp-in-string
regexp-find-symbols
count-regexp-occurrences
editor:regular-expression-search
LispWorks User Guide and Reference Manual - 20 Sep 2017