in reply to Regexp for alphabetical order match within the string
Just to be different, here's a solution that doesn't use REs or split():
sub isalphabetical { for my $i (0..(length($_[0])-2)) { return 0 if lc(substr($_[0],$i,1)) gt lc(substr($_[0],$i+1,1)); } return 1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Regexp for alphabetical order match within the string
by aquarium (Curate) on Oct 31, 2003 at 05:46 UTC |