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 <http://www.loquendo.it/> [EMAIL PROTECTED]
-----Original Message----- From: Jas Grewal (DHL UK) [mailto:[EMAIL PROTECTED] Sent: mercoledì 13 agosto 2003 15.29 To: [EMAIL PROTECTED] Org Subject: regular expresion question. Hi all, 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 just the '/usr/bin/sa/sa1' section. Any guidance would be appreciated. Jas ==================================================================== CONFIDENTIALITY NOTICE This message and its attachments are addressed solely to the persons above and may contain confidential information. If you have received the message in error, be informed that any use of the content hereof is prohibited. Please return it immediately to the sender and delete the message. Should you have any questions, please contact us by replying to [EMAIL PROTECTED] Thank you ====================================================================