subpattern
A subpattern is a pattern that forms a component of a larger pattern. It describes a smaller structure that can be recognized, extracted, or reused within a broader matching or design context. Subpatterns help organize complexity by encoding recurring motifs in modular pieces.
In regular expressions, subpatterns are implemented as groups. A capturing group, written with parentheses, defines a
Beyond regex, the term is used in parsing, tokens, and grammar design. Subpatterns correspond to rules or
In other domains, subpatterns appear in textile and visual arts as motifs embedded within a larger pattern,
Overall, subpatterns serve as a practical concept for modularity and reuse across computing and design disciplines.