Re: logical "and" pattern matching

2003-02-20 Thread R. Joseph Newton
Jenda Krynicky wrote: > It might be quicker ... > > while (<>) { > chomp; > print "\tOK ($_)\n" > if do {(local $_ = lc($_)) =~ tr/aeiou//dc; > /a/ and /e/ and /i/ and /o/ and /u/ > } > } > ... the loop it could look like thi

Re: logical "and" pattern matching

2003-02-20 Thread Paul
--- Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote: > On Feb 20, R. Joseph Newton said: > >if (/a/i and /e/i and /i/i and /o/i and /u/i) {print;} > > If you really want a one-regex solution, here's one. I don't suggest > its use, though. > > print if /(?=.*a)(?=.*e)(?=.*i)(?=.*o)(?=.*u)/i; Lo

Re: logical "and" pattern matching

2003-02-20 Thread Jenda Krynicky
From: "R. Joseph Newton" <[EMAIL PROTECTED]> > "John W. Krahn" wrote: > > > This is the closest but you need a separate match for each letter > > > > > # print $_ if /a\&e\&i\&o\&u/gi; # try a bitwise "and", with > > > # escapes print $_ if !/[bcdfghjklmnpqrstvwxyz]/gi; # try > > > #

Re: logical "and" pattern matching

2003-02-20 Thread Jeff 'japhy' Pinyan
On Feb 20, R. Joseph Newton said: >if (/a/i and /e/i and /i/i and /o/i and /u/i) {print;} If you really want a one-regex solution, here's one. I don't suggest its use, though. print if /(?=.*a)(?=.*e)(?=.*i)(?=.*o)(?=.*u)/i; -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobo

Re: logical "and" pattern matching

2003-02-20 Thread R. Joseph Newton
"John W. Krahn" wrote: > This is the closest but you need a separate match for each letter > > > # print $_ if /a\&e\&i\&o\&u/gi; # try a bitwise "and", with escapes > > # print $_ if !/[bcdfghjklmnpqrstvwxyz]/gi; # try not matching consonants > > print $_ if /(a+)(e+)(i+)(o+)(

Re: logical "and" pattern matching

2003-02-19 Thread John W. Krahn
Gary Merrick wrote: > > >Homework help is a touchy subject on this list. What have you tried? > > > >Have you read: > >perldoc perlop > >perldoc perlretut > > Yow! Ok, I have now. I suppose I've missed something, since I haven't yet come > up with a solution. :-\ > > >One sticky point with an

RE: logical "and" pattern matching

2003-02-19 Thread Gary Merrick
>Homework help is a touchy subject on this list. What have you tried? > >Have you read: >perldoc perlop >perldoc perlretut Yow! Ok, I have now. I suppose I've missed something, since I haven't yet come up with a solution. :-\ >One sticky point with and/or is that you need to break complex >sta

Re: logical "and" pattern matching

2003-02-19 Thread R. Joseph Newton
Gary Merrick wrote: > Ok, so this is probably a stupid question, but I'm a newbie, and therefore > stupid. :-] It'll take you about 5 seconds to figure this one out. > > I have an assignment that requires me to find words in a dictionary that contain > all five vowels (a, e, i, o, and u). I've

Re: logical "and" pattern matching

2003-02-19 Thread Wiggins d'Anconia
Gary Merrick wrote: Ok, so this is probably a stupid question, but I'm a newbie, and therefore stupid. :-] It'll take you about 5 seconds to figure this one out. I have an assignment that requires me to find words in a dictionary that contain all five vowels (a, e, i, o, and u). I've figured o

logical "and" pattern matching

2003-02-19 Thread Gary Merrick
Ok, so this is probably a stupid question, but I'm a newbie, and therefore stupid. :-] It'll take you about 5 seconds to figure this one out. I have an assignment that requires me to find words in a dictionary that contain all five vowels (a, e, i, o, and u). I've figured out the logical "or" p