Oct 11, 2006 #1 danny2785 Programmer Joined Jun 26, 2006 Messages 16 Location US How would you tell if there are 5 consonants in a row in a word? Thanks
Oct 11, 2006 #2 KevinADC Technical User Joined Jan 21, 2005 Messages 5,070 Location 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!