
AsiaSkyly
Novice
Aug 15, 2011, 5:41 PM
Post #1 of 4
(8531 views)
|
Help me with this regular expression!
|
Can't Post
|
|
Hello guys I am stuck... I have files named: 1. PRODUCTIONSPAINMAIN_EXP_110814 2. PRODUCTIONSPAINMAIN_EXP_110814_AFK_LIST 3. PRODUCTIONUSAMAIN_EXP_110814_AFK_LIST 4. PRODUCTIONSPAINMAIN_EXP_110812 5. PRODUCTIONSPAINMAIN_TXT_110814 6. PRODUCTIONSPAINMAIN_TXT_110814_TV_LST The date is usually yesterday's date, so I have that in a variable called $yesterday. The country is the $COUNTRY variable. Here is my pattern match which only partially works. $file =~ /^PRODUCTION[$COUNTRY].MAIN+.*[$yesterday]$/ Assuming $yesterday = 110814 and $COUNTRY = SPAIN That matches: 1 and 5 I need something that matches 1,2,5 and 6.
|