in reply to Re: regex testing for ALL of the vowels in a scalar
in thread regex testing for ALL of the vowels in a scalar
Very nice approach indeed. Just to touch up on including uppercase vowels:
$_ = 'A Lighthouse'; if (5 == keys %{{map {lc $_ => undef} m/([aeiou])/ig}}) { print "Found at least one of each vowel.\n"; } else { print "Not all vowels were found.\n"; }
|
|---|