👉 A subpattern is a sequence of elements in a given string or vector, which are not part of any larger pattern. For example, in the string "abcde", there could be several subpatterns like "a", "b", and "c". Subpatterns can be considered as smaller sequences that can be combined to form larger patterns.