Wildcard
Wildcards are simplified pattern-matching characters: * matches any sequence and ? matches a single character; commonly used for file-name and domain matching.
Purpose
Provides the simplest pattern-matching mechanism, suited to non-technical users and simple matching scenarios.
Mechanism
* matches zero or more arbitrary characters; ? matches exactly one arbitrary character. Some implementations support the [] character class. No grouping, no quantifiers, no escaping (or limited escaping). In DNS and certificate SANs, *.example.com matches subdomains.
Use cases
- DNS wildcard resolution
- SSL certificate wildcard domains
- Shell file-name expansion
- Simple matching in search boxes
Examples
- Input
*.example.comOutputMatches a.example.com, b.example.comWildcard domain
Common errors
- Wildcard certificates matching multi-level subdomains (a.b.example.com does not match)
- Wildcards match a single level only; multi-level subdomains need separate certificates
Related terms
Glob
Glob is shell-style file-path pattern matching that uses wildcards such as * ** ? [] to match file names; it is simpler than regex. GLOSSARY
Regular Expression
A regular expression is a formal language for describing string patterns, defining matching rules with metacharacters and quantifiers; it is widely used for search, validation, and extraction. GLOSSARY