Help for this page

Select Code to Download


  1. or download this
    use strict;
    my $a='ABCAAAABBBCCCCCAAABBBCCC';
    my $b='ASRGRTGRT89579843rrrrrr';
    print '$a matches',$/ if $a =~ /^[ABC]+$/;
    print '$b matches',$/ if $b =~ /^[ABC]+$/;
    
  2. or download this
    perl -MYAPE::Regex::Explain -e 'print YAPE::Regex::Explain->new(qr/^[A
    +BC]+$/)->explain;'
    The regular expression:
    ...
    ----------------------------------------------------------------------
    )                        end of grouping
    ----------------------------------------------------------------------