getFieldInFormat() : fixed regex with the new LSformat possibilities (upper/lower case)

This commit is contained in:
Benjamin Renard 2010-04-16 15:37:43 +02:00
parent 5247955cfc
commit 656dad2c14

View file

@ -166,7 +166,7 @@ function _getFData_extractAndModify($data,$ch) {
function getFieldInFormat($format) {
$fields=array();
$expr="%{([A-Za-z0-9]+)(\:(-?[0-9])+)?(\:(-?[0-9])+)?}";
$expr="%{([A-Za-z0-9]+)(\:(-?[0-9])+)?(\:(-?[0-9]+))?(-)?(\!|\_)?(~)?}";
while (ereg($expr,$format,$ch)) {
$fields[]=$ch[1];
$format=ereg_replace($ch[0],'',$format);