Help for this page

Select Code to Download


  1. or download this
    @files=("zzz.21.yy.ccc", "zzz.220.ccc" );
    
    ...
        $match="yes" if ( $name =~ /(^[a-z]{3})\.(\d{2,3})\..*\.ccc/) ;
        print "$match, $name, match1: $1, match2: $2\n";
      }
    
  2. or download this
    perl issueWithRegex.pl 
    yes, zzz.21.yy.ccc, match1: zzz, match2: 21
    no , zzz.220.ccc, match1: zzz, match2: 21.
    
  3. or download this
    perl issueWithRegex.pl
    yes, zzz.21.yy.ccc, match1: zzz, match2: 21
    no , zzz.220.ccc, match1: zzz, match2: 21