Answering your question: it is much easier and clearer to have an if test for these two strings.
You will have to replace ${DIR} by its real value of course, unless it is a variable, which I did not assume.if ($file eq '${DIR}/TEST-246.92.00.tar.gz' or $file eq '${DIR}/TEST-2 +46.92.00-INTERNAL.tar.gz') { ... }
If you must have a regex the following will do:
(Again if necessary replacing ${DIR})m/\${DIR}/TEST-246.92.00.tar.gz|\${DIR}/TEST-246.92.00-INTERNAL.tar.gz +/
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
In reply to Re: Regular Expression
by CountZero
in thread Regular Expression
by Noame
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |