in reply to Another regex to solve ...
prints:use warnings; use strict; while (<DATA>) { chomp; if (/[^aeiou][aeiou]p$/i) { print "$_ match\n"; } else { print "$_ no match\n"; } } __DATA__ carp step tip stoop steep asp food mop up
As you can see, the 2-letter up does not match. Is that ok? UPDATE: I like AR's solution better because it does match for up.carp no match step match tip match stoop no match steep no match asp no match food no match mop match up no match
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Another regex to solve ...
by pat_mc (Pilgrim) on Aug 18, 2011 at 16:41 UTC |