chickadee » agrep » make-pattern

make-pattern STRING #!optional TRANSLprocedure

Compiles a search pattern. The syntax for patterns is similar to that of the Unix shell. The following constructs are recognized:

?
match any single character
*
match any sequence of characters
[..]
character set: ranges are denoted with -, as in [a-z]; an initial ^, as in [^0-9], complements the set
&
conjunction (e.g. sweet&sour)
|
alternative (e.g. high|low)
(..)
grouping
\
escape special characters; the special characters are \?*[]&|().

The optional argument TRANSL is a character translation table.