glob pattern

term

programming

Kept in this browser · My desk

A wildcard pattern in which * stands for any run of characters, ? for one character and a bracket for a set; the default pattern style of Tcl's string match and of Expect.

Glob patterns come from the Unix shell's file-name matching. In Tcl's string match the pattern must match the whole string; Expect's own glob matcher, used for every expect pattern without -re or -ex, matches anywhere in its buffer, anchors with ^ only as the first character and $ only as the last, and lets * take the longest run it can. A backslash makes the next character ordinary, which is why a braced \r in a glob pattern means the letter r.

Also known as: glob, wildcard pattern, string match

← Back to G Back to the glossary