pertrai1
pertrai1

Reputation: 4318

Multiple File Name Match

how would I accomplish the following that are in the comments:

UPDATE: Had wrong file naming convention in comments

// Do any of the file names in the list match the file name for this run?
// Full file name is cs1212-42173-TVCS.csv or cs1212-42173-TVWK.csv
$pattern = '/cs'.date('md').'-\d{5}-TVCS\.csv/i';

Right now it is only getting the TVCS file name but I need for it to look for both TVCS and for TVWK.

Thank you

Upvotes: 1

Views: 62

Answers (1)

Jeroen
Jeroen

Reputation: 13257

$pattern = '/cs' . date('md') . '-\d{5}-TV(CS|WK)\.csv/i';

Upvotes: 1

Related Questions