Patterns for APT

Historically, APT supported package names, regular expressions, and fnmatch() style expressions. Now we want to add aptitude patterns to the mix.

Long patterns

Long patterns in general have the form ?name(arg, arg, ...)

Short patterns

Short patterns have the form


Where NAME is a single character, and the first space is optional


If an argument starts with ? or ~ it's a pattern. A pattern can only contain other patterns, and not historic syntax. Historic syntax cannot contain patterns.

This means that our syntax is not fully compatible to aptitude if you specify bare words: aptitude interprets them as regular expressions; APT treats it as word, regex or fnmatch pattern depending on the content and if something matched.