RE: FileName Pattern Matching

2001-09-28 Thread Thomas R Wyant_III
See my previous note. To demonstrate: C:\>perl -MFile::Basename -e "$_ = 'C:\\ba\\log\\ULOG.20010101'; print 'yes' if basename ($_) =~ /^ULOG/i;" yes C:\> Tom Wyant ___ ActivePerl mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailma

RE: FileName Pattern Matching

2001-09-27 Thread Toby Stuart
]; [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject:RE: FileName Pattern Matching > > > Hi Jeff, > Thanks for the pointer. You gave me an idea which worked. I noticed > the > extra "\" on your code and I mu

RE: FileName Pattern Matching

2001-09-27 Thread Toby Stuart
teven&Alison Chua [SMTP:[EMAIL PROTECTED]] > Sent: Friday, September 28, 2001 2:14 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: FileName Pattern Matching > > > Hi Jeff, > Thanks for the poin

RE: FileName Pattern Matching

2001-09-27 Thread Steven&Alison Chua
the statement: if (m#.+\\ulog#i)? Regards Steven >From: Jeffrey <[EMAIL PROTECTED]> >To: Steven&Alison Chua <[EMAIL PROTECTED]>, >[EMAIL PROTECTED] >CC: [EMAIL PROTECTED], [EMAIL PROTECTED] >Subject: RE: FileName Pattern Matching >Date: Thu, 27 Sep 2001 20:

RE: FileName Pattern Matching

2001-09-27 Thread Jeffrey
look at the perlre manpage. Tried the > options but I could'nt > get it to work. > > Do you or anyone else have any suggestion. > > Thanks > Steven Chua > > > >From: Thomas Bätzler > <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] > >

Re: FileName Pattern Matching

2001-09-27 Thread Bill Luebkert
Steven&Alison Chua wrote: > > Thanks Tom and James for your help. > > Sorry I forgot to mention that the filename has the filename "path" in it. > Hence the caret "^" wouldn;t work. > Eg of filename:"C:\ba\log\ULOG.20010101" > > I did have a look at the perlre manpage. Tried the options but I

RE: FileName Pattern Matching

2001-09-27 Thread Steven&Alison Chua
#x27;nt get it to work. Do you or anyone else have any suggestion. Thanks Steven Chua >From: Thomas Bätzler <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >CC: "'Steven&Alison Chua'" <[EMAIL PROTECTED]> >Subject: RE: FileName Pattern Matching >Date:

RE: FileName Pattern Matching

2001-09-27 Thread Thomas Bätzler
> From: Steven&Alison Chua [mailto:[EMAIL PROTECTED]] asked: > I'm having some difficulty matching files starting with a name. [...] > I've tried using the following line but it is not accurate as > it retuens > files with ULOG at the end of the filename as well: > > (-f $_ && $_=~/\ULOG

RE: FileName Pattern Matching

2001-09-27 Thread James . Herbert
u need to use the ^ (caret) in your regex, to say "starts with". $_ =~ /^ULOG/i; HTH jim -Original Message- From: beebzz Sent: 27 September 2001 09:31 To: activeperl Cc: beebzz Subject: FileName Pattern Matching Hello everyone, I'm having some difficulty matching