Help for this page

Select Code to Download


  1. or download this
    sub is_valid {
        my $test = shift;
        return $test =~ /\Aaaa_\w{1,24}(?<=\D)\d{4}\z/;
    }
    
  2. or download this
    for my $str (qw(aaa_gjh1_dfgdf_0009 aaa_gjh_0000 aaa_fdsfs_000 aaa_sdf
    +_jdsh_01111)) {
        print (is_valid($str) ? "ok $str\n" : "not ok $str\n");
    }