日期:2014-05-17  浏览次数:20445 次

PHP5读取EXCEL内容时的一个正则表达式函数
用的是php-ExcelReader读取EXCEL,其中类里有下面一段代码,用来格式化EXCEL中的日期内容

PHP code

/*if (divg_match("/[^hmsday\/\-:\s]/i", $formatstr) == 0) { // found day and time format

$isdate = TRUE;

$formatstr = str_replace('mm', 'i', $formatstr);

$formatstr = str_replace('h', 'H', $formatstr);

//echo "\ndate-time $formatstr \n";

s}*/



但是错误提示是找不到divg_match()这个函数,有用过这个函数的吗?PHP怎么才能包含这个函数?


------解决方案--------------------
preg_match