Minimum Matching

When a pattern-matching operator can match multiple tokens ($+ and $+) sendmail performs minimum matching. For example, consider a workspace of xxx.yyy.zzz and an LHS of:

$+.$+

The first $+ matches only a single token (xxx) but the second $+ matches three (yyy, a dot, and zzz). This is because the first $+ matches the minimum number of tokens that it can while still allowing the whole LHS to match the workspace. Shortly, when we discuss the RHS, we’ll show why this is important.

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.