FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 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)

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-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.

Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version