RE: regex confusion...

2005-02-22 Thread Peter Eisengrein
I broke it with brackets, parenthetically speaking. Thanks all - simple mind making a simple mistake. -Original Message- From: Peter Eisengrein [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 5:05 PM To: 'Perl-Win32-Users Mailing List (E-mail)' Subject: RE: regex

RE: regex confusion...

2005-02-21 Thread Tom Pollard
On Mon, 21 Feb 2005, Peter Eisengrein wrote: > sorry about that. a bit too quick on the trigger finger. I have the > following: > > @files = grep { /^ccs_[cas|pri|atsm]/ && -f "$dir/$_" } readdir(DIR); > > There are other files in $dir that start with ccs but I only want ccs_cas > ccs_pri or ccs

RE: regex confusion...

2005-02-21 Thread cassell . david
Peter Eisengrein <[EMAIL PROTECTED]> wrote: > sorry about that. a bit too quick on the trigger finger. I have the following: No problem. A little fat-fingering happens now and then. > @files = grep { /^ccs_[cas|pri|atsm]/ && -f "$dir/$_" } readdir(DIR); > > There are other files in $dir that sta

RE: regex confusion...

2005-02-21 Thread Chris Snyder
Try changing the square brackets to parentheses.   -Original Message- From: Peter Eisengrein [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 4:05 PM To: 'Perl-Win32-Users Mailing List (E-mail)' Subject: RE: regex confusion...   sorry about that. a bit to

RE: regex confusion...

2005-02-21 Thread Peter Eisengrein
sorry about that. a bit too quick on the trigger finger. I have the following:   @files = grep { /^ccs_[cas|pri|atsm]/ && -f "$dir/$_" } readdir(DIR); There are other files in $dir that start with ccs but I only want ccs_cas ccs_pri or ccs_atsm but for some reason it seems to also match a fi