RE: regular expresion question.

2003-08-14 Thread Jas Grewal \(DHL UK\)
Thanks Rob and James, I used the match for everything after and including the slash up until the white space and it works a treat. -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED] Sent: 13 August 2003 14:47 To: [EMAIL PROTECTED] Subject: Re: regular expresion question. Jas

Re: regular expresion question.

2003-08-14 Thread Rob Dixon
Jas Grewal wrote: > > I am trying to write a regular expresion to get a file path from > a cron file, I have issolated the required lines, but am having > problems with extracting just the file path and name. > > The line is as follows : > > 30 23 * * * /usr/lbin/sa/sa1 600 6 > > I inned to extract

RE: regular expresion question.

2003-08-14 Thread Darbesio Eugenio
Try $a = "30 23 * * * /usr/lbin/sa/sa1 600 6"; $a =~ m|[^\/]+(.*\/[^\/\s]+)\s[^\/]+|i; $path = $1; print $path ; E. LOQUENDO S.p.A. Vocal Technology and Services www.loquendo.it [EMAIL PROTECTED] -Original Message- From: Jas Grewal (DHL

RE: regular expresion question.

2003-08-14 Thread EUROSPACE SZARINDAR
you also could try this while () { my $FilePath = (split)[5]; print "\$FilePath = $FilePath \n"; } __DATA__ 30 23 * * * /usr/lbin/sa/sa1 600 6 Michel -Message d'origine- De: Jas Grewal (DHL UK) [mailto:[EMAIL PROTECTED] Date: mercredi 13 août 2003 15:29 À: [EMAIL PROTECTE

Re: regular expresion question.

2003-08-14 Thread James Edward Gray II
On Wednesday, August 13, 2003, at 08:28 AM, Jas Grewal ((DHL UK)) wrote: Hi all, Howdy. I am trying to write a regular expresion to get a file path from a cron file, I have issolated the required lines, but am having problems with extracting just the file path and name.   The line is as follo