Newbie dot Org HomePage
Visit one of our web buddies
Regular Expressions
Sample / Examples
Return to main thread

#!/usr/bin/perl
use strict;

my (@gerbal) = (
		'Newbie',
		'Nbwbie', 
		'Nrjklmnwbie', 
	);

foreach my $foot (@gerbal) {
	print "$foot -- ";
	if ($foot =~ /N[^aeiou]+wbie/) {
		print " match found.\n";
	} else {
		print " no match.\n";
	}
}
exit;

Results:

Newbie --  no match.
Nbwbie --  match found.
Nrjklmnwbie --  match found.


Return to main thread