Oct 11, 2006 #1 danny2785 Programmer Jun 26, 2006 16 US How would you tell if there are 5 consonants in a row in a word? Thanks
Oct 11, 2006 #2 KevinADC Technical User Jan 21, 2005 5,070 US one obvious way: Code: my $word = 'aidcvfrtougtn'; if($word =~ /([bcdfghjklmnpqrstvwxyz]{5})/) { print "Found five in a row: $1\n"; } else { print "No joy!\n"; } - Kevin, perl coder unexceptional! Upvote 0 Downvote
one obvious way: Code: my $word = 'aidcvfrtougtn'; if($word =~ /([bcdfghjklmnpqrstvwxyz]{5})/) { print "Found five in a row: $1\n"; } else { print "No joy!\n"; } - Kevin, perl coder unexceptional!