From 5b65b9b90951893156ae0e1f4f09689a0d81c93f Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Thu, 21 May 2009 11:17:52 -0400 Subject: [PATCH] revert; this didn't fix all cases --- framework/Date_Parser/lib/Horde/Support/Numerizer/Locale/Base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/Date_Parser/lib/Horde/Support/Numerizer/Locale/Base.php b/framework/Date_Parser/lib/Horde/Support/Numerizer/Locale/Base.php index 9d314addc..b6cc380a5 100644 --- a/framework/Date_Parser/lib/Horde/Support/Numerizer/Locale/Base.php +++ b/framework/Date_Parser/lib/Horde/Support/Numerizer/Locale/Base.php @@ -124,7 +124,7 @@ class Horde_Support_Numerizer_Locale_Base protected function _andition($string) { while (true) { - if (preg_match('/([1-9]\d*)( | and )([1-9]\d*)(?=[^\w]|$)/i', $string, $sc, PREG_OFFSET_CAPTURE)) { + if (preg_match('/(\d+)( | and )(\d+)(?=[^\w]|$)/i', $string, $sc, PREG_OFFSET_CAPTURE)) { if (preg_match('/and/', $sc[2][0]) || $sc[1][0] > $sc[3][0]) { $string = substr($string, 0, $sc[1][1]) . ((int)$sc[1][0] + (int)$sc[3][0]) . substr($string, $sc[3][1] + strlen($sc[3][0])); continue; -- 2.11.0