Wildcards are a greatly simplified variant of UNIX-style regular expressions. They allow for matching several file names with one character string and are most frequently used on the DOS and &os2; command lines.

&os2; understands two wildcard characters:

  1. The asterisk (*) character matches any sequence of characters (no character, one character, or many characters).

    For example, h*e will match he, house, and home.

  2. The question mark (?) matches exactly one character.

    For example, h??e will match home, but not he or house.

Wildcards can also be combined. For example, h*e.?x? will match house.txt and he.exe

Note that as opposed to DOS, under &os2; the dot (.) in file names is a special character only with files on the FAT file system.