The alternation is constrained by the parentheses, so literally, this regex means
˘match the start of the line, then one of !From", !Subject", or !Date", and then match
!: ".÷ Effectively, it matches:
1) start-of-line, followed by F r o m, followed by `: '
or 2) start-of-line, followed by S u b j e c t, followed by `: '
or 3) start-of-line, followed by D a t e, followed by `: '
Putting it less literally, it matches lines beginning with `From: ', `Subject: ', or
`Date: ', which is quite useful for listing the messages in an email ňle.
I was however able to get this online regular expression evaluation tool to yield the exact result outlined in the book quote above. To do this it was necessary to switch the language selection switch to "Ruby" and select the global checkbox as well.orFrom: firstname.lastname@example.org (The King)From:
Subject: be seein' ya around Subject:
Ignoring Differences in Capitalization
Date: Thu, 22 Aug Date: 2002 11:04:13 Date:
Ignoring Differences in Capitalization Date:
From: The Prez email@example.com
Ignoring Differences Subject: in Capitalization
Date: Tue, 27 Aug 2002 8:36:24
Subject: now, about your vote