4.5 Anchoring

In the mail examples in Section 4.3.3.2 when we looked at a pattern such as /From:/, /Date:/ or

/Subject:/, we essentially said that the pattern can occur anywhere in the target string, not at a specific location. For example, if we search for the pattern /From:/ in the /usr/spool/mail/kalita file we talked about earlier, it matches each one of the following four lines because each one contains the substring From:.

 

From: "Brahma, Malavika (Exchange)" <MBrahma@Bear.COM>

> From: J. Kalita [SMTP:kalita@pikespeak.uccs.edu]

> > > From:     Chatterjee, Rajeeb [SMTP:rajeeb.chatterjee@intel.com]

> > > > From:     KBhuyan@aol.com [SMTP:KBhuyan@aol.com]

 

Now, if we are dealing with a mail file in Unix, the first corresponds to a complete message from

MBrahma@Bear.COM in the mailbox file whereas the second corresponds to a message included or forwarded from kalita@pikespeak.uccs.edu. This forwarded message in turn contains two recursively forwarded or included messages. Most mailer programs indent included or forwarded messages and precede each line or an included message with a certain character such as > for each level of inclusion or forwarding.