#!/usr/bin/perl
use strict;
my (@gerbal) = (
'Nawbie',
'Nebwbie',
'Neeioaawbie',
'NeeiRaawbie',
);
foreach my $foot (@gerbal) {
print "$foot -- ";
if ($foot =~ /N[aeiou]+wbie/) {
print " match found.\n";
} else {
print " no match.\n";
}
}
exit;
Results:
Nawbie -- match found.
Nebwbie -- no match.
Neeioaawbie -- match found.
NeeiRaawbie -- no match.
|