- 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";
}
- or download this
perl issueWithRegex.pl
yes, zzz.21.yy.ccc, match1: zzz, match2: 21
no , zzz.220.ccc, match1: zzz, match2: 21.
- or download this
perl issueWithRegex.pl
yes, zzz.21.yy.ccc, match1: zzz, match2: 21
no , zzz.220.ccc, match1: zzz, match2: 21