in reply to Regexp for alphabetical order match within the string

You might want to at least make that easier to generate, and anchor the regex (otherwise you'll always get a match):
my $str = join '', map "$_*", "a".."z"; my $re = qr/^$str$/; print "Matches\n" if "abc" =~ $re; print "Doesn't match\n" unless "zbc" =~ $re;

Replies are listed 'Best First'.
Re: Re: Regexp for alphabetical order match within the string
by CountZero (Bishop) on Oct 30, 2003 at 19:30 UTC
    And perhaps make the regex case-insensitive.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law