Help for this page

Select Code to Download


  1. or download this
    my $string = <>;
    $string =~ /(\w*(\w)\w*\2\w*)/;
    # The beginning of the word, then a notable letter, 
    # maybe some middle letters, then that same notable letter as before, 
    # then the rest of the word.
    print "Found word '$1', with duplicated letter '$2'\n";
    
  2. or download this
    >image imagination dream
    Found word 'imagination', with duplicated letter 'n'
    >