我需要从字符串中提取日期,下面是我的代码和字符串。
$str = "Updated status to Masters - Software Engineering (Enrolled-
Documents to Send) on 03/06/2014 14:10 by Rabih Haddad .";
if(preg_match_all('/.*([A-Za-z]{3,4}, [A-Za-z]{3,4} [\d]{1,2}, [\d]{4}).*/',$str,$matches))
{
print_r($matches);
}
else
echo "not matched";
Run Code Online (Sandbox Code Playgroud)
如何date(03/06/2014)从字符串中提取值。