On Friday, May 24, 2002, at 08:13 , Ankit Gupta wrote:

> Hello,
>
>           I am working on a project in which I need to get Date part of
> below written header. I am trying to use Regular expression to extract 
> Date:
> line. I am able to achieve everything after the Date: word but not only 
> that
> line. I mean to say that I need only this string Thu, 23 May 2002 19:47:50
> +0530  . Can someone help me in this. I am trying
>  $header =~ m/Date:/; and then my $ab =  " $' \n"; but this gives me
> everything after Date: word. As I wrote above, I need only Thu, 23 May 
> 2002
> 19:47:50 +0530   string

we did a similar problem trying to grovel out the Proxy-Auth:

http://www.wetware.com/drieux/pbl/RegEx/parseProxyAuth.txt

the simplest solution would be

        $header =~ m/Date:\s*([^\n]+)/;
                my $dtg = $1;


ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to