how to match a date in array of date and grep that text file
I have to search a specific date of data among more than 1 files , like I have 5 files with different dates ,,01-05-2014, 10-05-2014, 15-05-2014, 01-06-2014and 08-06-2014,,, and date to search is 17-05-2014 will exist in file with creation/modification date 15-05-2014. so how can I do this? please suggest me. thanks for your help
Wim SturkenboomPosted Oct 3, 2014, 7:12 AM
Loop through all the files; if preg_grep returns an array, you've found the file and can do whatever you want to do with it.
See also:
http://php.net/manual/en/function.preg-grep.php
http://php.net/manual/en/function.file.php