Home  >  Article  >  Backend Development  >  PHP5读取EXCEL内容时的一个正则表达式函数解决办法

PHP5读取EXCEL内容时的一个正则表达式函数解决办法

WBOY
WBOYOriginal
2016-06-13 13:52:17927browse

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

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
/*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
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn