[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Newbie regex



Sorry in advance if this question  is too basic.
As an exercise in learning perl, I am trying to work out how
to split the perl mail digest into "from,subject,date and
body" for possible transfer to a DB (like FMPro)  but am
stuck  distinguishing the date headers from the actual date
lines.


I dont want these lines

    Date: Wed, 27 Oct 1999 05:00:21 -0700 (PDT)
    
but I do want 

    Date: Sun, 12 Dec 1999 15:20:47 -0500
    
    
This code partly works but picks up the PDT ones too.

   next unless /^Date:?\s/i ... /macperl.org$/s;
   print OUT;


How do I negate this pattern

    (/^Date/ and /PDT\)/)
    
    
with the other or is this the wrong thing to do?
    
    
Thanks for any help.



Regards,

Mark Bedish
(Surrey,UK)



# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org