Skip to content

Glob cheat sheet

A rule pattern uses * and ? as wildcards. What * matches depends on the kind of pattern.

A full pattern has a host and a path, for example meet.google.com/*. The rule editor writes this kind. A domain-only pattern tests the host alone, with no port and no path. Rules made from some presets carry this kind.

PatternWhat it matchesExample
* in a full patternAnything, including dots and slashes.meet.google.com/*
* in a pathAnything, including dots and slashes.example.com/docs/*
* in a domain-only patternOne segment of the host. It does not cross a dot.dev-*.example.com
*. at the start of a domain-only patternAny chain of subdomains, or none. The base domain matches too.*.example.com matches example.com
?Exactly one character.example.com/v?/*
. and /Themselves only.example.com/

Case does not matter. A pattern must match the whole text, not part of it. A second * after a *. prefix is a plain character, so *.staging.* does not work.

PatternMatchesDoes not match
meet.google.com/*meet.google.com/abc-defg-hijmail.google.com/inbox
*.google.com/* (full pattern)mail.google.com/inbox, docs.google.com/document/1google.com/search. A full pattern needs the dot before google.com.
*.example.com (domain-only)example.com, a.b.example.comexample.com.evil.net, myexample.com
dev-*.example.com (domain-only)dev-alice.example.comdev-alice.staging.example.com
example.com/v?/*example.com/v1/apiexample.com/v10/api

For how the rule editor builds a pattern, see Match a link with a simple pattern.