<<< Date Index >>>     <<< Thread Index >>>

Re: Fwd: broken "^From " header



> Here's a little script based on your regex:
[snip]
> ... (/ [MTWFS][ouehra][neduit] [JFMAMSOND][aepuc][nbrynlgptvc] ...

Personally, I'd have the match the desired strings explicitly, like so:

    / (Mon|Tue|Wed|Thu|Fri|Sat|Sun) 
(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)/

for no other reason than clarity; it's immediately obvious what's
intended to be matched by the above, whereas the original takes a little
working out.

Perl also offers a modifier, 'x', which allows you to use whitespace in
your regex to improve readability - this is further detailed in the
perlre and perlop manpages.

hth,
-kev


-- 
    <Snipe> Confusion, Denial, Accusation, Acceptance, Downplay
    <Snipe> the 5 stages a supporter goes through when taking a call

        snipe, psuedopsychoanalyzing on #phishtank (irc.indigo.ie)