--- Begin Message ---
Hi
A way to solve your problem is to use the FILE module and take the filename
out using basename.
I think BaseName.pm can be downloaded form CPAN.
Please try the following:
use File::Basename;
@filenames = qw (/tmp/test/.test.txt /tmp/test/hallo.txt
/tmp/test/xyz/abc.txt /var/log/ksy/123.log);
foreach $files (@filenames)
{
if ((basename $files) !~ /^\./)
{
print (basename $files);
}
}
Thankyou
VENU
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, July 25, 2003 2:39 PM
To: [EMAIL PROTECTED]
Subject: REGEX PROBLEM
hi, i have the follwing strings:
/tmp/test/.test.txt
/tmp/test/hallo.txt
/tmp/test/xyz/abc.txt
/var/log/ksy/123.log
now i need a regex that matches all lines but the one that contains a
filename starting with a point. like ".test.txt". how can i do that?
this is what i have:
'\.(?!tgz)[^.]*$' this matches everything, but tgz at the end of a
line, so
'(?!\.)[^.]*$' should do the job, but it doesnt:(....
THANK YOU:)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--- End Message ---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]