next up previous contents
Next: 2.13.3 Logical Pathnames Up: 2.13 Pathnames Previous: 2.13.1 Unix Pathnames

2.13.2 Wildcard Pathnames

Wildcards are supported in Unix pathnames. If `*' is specified for a part of a pathname, that is parsed as :wild. `**' can be used as a directory name to indicate :wild-inferiors. Filesystem operations treat :wild-inferiors the same as :wild, but pathname pattern matching (e.g. for logical pathname translation, see section 2.13.3) matches any number of directory parts with `**' (see see section 2.14.1.)

`*' embedded in a pathname part matches any number of characters. Similarly, `?' matches exactly one character, and `[a,b]' matches the characters `a' or `b'. These pathname parts are parsed as pattern objects.

Backslash can be used as an escape character in namestring parsing to prevent the next character from being treated as a wildcard. Note that if typed in a string constant, the backslash must be doubled, since the string reader also uses backslash as a quote:

(pathname-name "footex2html_wrap18376*bar") => "foo*bar"


Raymond Toy
Mon Jul 14 09:11:27 EDT 1997