[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

# 1. The Wildcard Module

Wildcards, also called "Shell Filename Patterns", describe sets of file names.

The `wildcard` package exports the following symbol:

Function: match pattern string [:start] [:end] [:case-insensitive]
  This function returns a non-`nil` value if the string matches the pattern.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

# 2. Wildcard Syntax

`*`
  Matches any zero or more characters.

`?`
  Matches any one character.

`[string]`
  Matches exactly one character that is a member of the string string. This is called a character class. As a shorthand, string may contain ranges, which consist of two characters with a dash between them. For example, the class ``[a-z0-9_]'` matches a lowercase letter, a number, or an underscore. You can negate a class by placing a ``!'` or ``^'` immediately after the opening bracket. Thus, ``[^A-Z@]'` matches any character except an uppercase letter or an at sign.

`\`
  Removes the special meaning of the character that follows it. This works even in character classes.

Slash characters have no special significance in the wildcard matching, unlike in the shell, in which wildcards do not match them. Therefore, a pattern ``foo*bar'` can match a file name ``foo3/bar'`, and a pattern ``./sr*sc'` can match a file name ``./src/misc'`.

[Top] | [Contents] | [Index] | [ ? ]

# Table of Contents

1. The Wildcard Module
2. Wildcard Syntax

[Top] | [Contents] | [Index] | [ ? ]

# Short Table of Contents

> 1. The Wildcard Module
> 2. Wildcard Syntax

[Top] | [Contents] | [Index] | [ ? ]

# About this document

This document was generated on June, 12 2002 using texi2html

The buttons in the navigation panels have the following meaning:

Button | Name | Go to | From 1.2.3 go to
--- | --- | --- | ---
[ < ] | Back | previous section in reading order | 1.2.2
[ > ] | Forward | next section in reading order | 1.2.4
[ << ] | FastBack | previous or up-and-previous section | 1.1
[ Up ] | Up | up section | 1.2
[ >> ] | FastForward | next or up-and-next section | 1.3
[Top] | Top | cover (top) of document |
[Contents] | Contents | table of contents |
[Index] | Index | concept index |
[ ? ] | About | this page |

where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:

- 1. Section One

- 1.1 Subsection One-One

- ...

- 1.2 Subsection One-Two

- 1.2.1 Subsubsection One-Two-One
- 1.2.2 Subsubsection One-Two-Two
- 1.2.3 Subsubsection One-Two-Three <== Current Position
- 1.2.4 Subsubsection One-Two-Four

- 1.3 Subsection One-Three

- ...

- 1.4 Subsection One-Four

This document was generated on June, 12 2002 using texi2html