| Allegro CL version 8.2 Moderately revised from 8.1. 8.1 version |
Arguments: string &key extended-mode
The several functions that accept quasi-Perl string representation for regular expressions (e.g. match-re) also accept parse tree syntax. parse-re is the function that translates the string representation into the tree representation. It is used internally as the first pass of compile-regexp, but occasionally is may be useful in application code.
The extended-mode keyword argument controls
whether the parse begins in regular or extended mode. The default is
nil
. If true, it is as if the regexp string is
prefaced with "(?x)".
cl-user(11): (parse-re ".*") (:greedy-repetition 0 nil :everything) cl-user(12): (parse-re ".*?") (:non-greedy-repetition 0 nil :everything) cl-user(13): (parse-re "^[A-E]") (:sequence :start-anchor (:char-class (:range #\A #\E))) cl-user(14): (parse-re "i.*s") (:sequence #\i (:greedy-repetition 0 nil :everything) #\s) cl-user(15):
See Regexp trees in regexp.htm for information on the tree syntax.
The symbol naming this operator is also exported from the regexp package.
See The new regexp2 module in regexp.htm for further information on this function and the regexp2 module.
Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page has had moderate revisions compared to the 8.1 page.
Created 2016.6.21.
| Allegro CL version 8.2 Moderately revised from 8.1. 8.1 version |