Hello Roland,
Historians believe that Tuesday, September 11, 2001 at 05:36 GMT +0200
was when, Roland Burger [RB] typed the following:
RB> Here is the header:
RB> Delivery-date: Tue, 11 Sep 2001 00:23:36 +0200
<snip>
This is the line causing the problem.
RB> Date: Mon, 10 Sep 2001 15:22:33 -0700
<snip>
This is the line you want. Just change your regexp from:
(?m-s)Date\:\s*?((.*?[\d]{4})\s*?([\d]{0,2}\:[\d]{0,2})\s*?(.*))
To:
(?m-s)^Date\:\s*((.*?[\d]{4})\s*([\d]{0,2}\:[\d]{0,2})\s*(.*))
All that's changed is we added an anchor so the word Date must be the
first thing on the line. It should work now. In fact, the way you're
using the regexp, you can replace that complicated mess with something
much simpler:
(?m-s)^Date\:\s*(.*?)\s*$
--
Thanks for writing,
Januk Aggarwal
Using The Bat! 1.54 Beta/8 under Windows 98 4.10 Build 2222 A
OK, I'm weird! But I'm saving up to become eccentric.
--
______________________________________________________
Archives : http://tbtech.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]