in reply to regex to match a literal dot near end of string
Also, maybe someone can answer this for me. Is there an advantage to matching the \. as part of the second atom? That is to say, what is the advantage of
over$name =~ /^(.+)(\..+)$/ or die "$name is an invalid patch name"; "$1$platform$2";
$name =~ /^(.+)\.(.+)$/ or die "$name is an invalid patch name"; "$1$platform.$2";
As an aside, I noticed you're looking for files ending in both .Z and .tar. Is it possible you will want to match files ending in .tar.Z (or .tar.gz) as well?
|
|---|