in reply to Re: Regular Expression
in thread Regular Expression

Thanks a lot for everybodies input. I'm not sure why the chomp function was not working correctly but it is working correctly now which solved most of the other problems I was having. I have one more question... Is there a way to match words with double letters.. ex keenness or mississippi? Also is there a way to match words that are in alphabetical order.. ex abby or abit? Thanks so much for your help. =0)

Replies are listed 'Best First'.
Re: Re: Re: Regular Expression
by antirice (Priest) on May 19, 2003 at 07:59 UTC
    For double letters:
    if ($word =~ /(.)\1/) ...
    All letters in alphabetical order (not regex):
    if (lc($word) eq join "", sort split //, lc($word));

    antirice    
    The first rule of Perl club is - use Perl
    The
    ith rule of Perl club is - follow rule i - 1 for i > 1