this is my code that extracts the date "2016-06-13" from the string "ffg_LTE_2016-06-13"
$re = '/(\d{8})|([0-9]{4}-[0-9]{2}-[0-9]{2})|([0-9]{2}-[0-9]{2}-[0-9]{4})/';
$str = "ffg_LTE_2016-06-13";
preg_match($re, $str, $matches);
$date=$matches[0];
print_r($date);
Now what I want to do is do somthing like this in a for loop but I am having issues with storing the result in an array. What I want to do is the same as above but do it on each elememt in the array.
$files=["ffg_LTE_2016-06-13","ffg_LTE_2016-06-14"];
foreach ($files as $value) {
print_r("<br>".$value."<br>");
}
So my end result would be
$files_2=["2016-06-13","2016-06-14"];
here is my fiddle