diff --git a/Repositories/statistics/scripts/eprints-usage_src.php b/Repositories/statistics/scripts/eprints-usage_src.php index f4c827a..65d7b19 100755 --- a/Repositories/statistics/scripts/eprints-usage_src.php +++ b/Repositories/statistics/scripts/eprints-usage_src.php @@ -465,7 +465,7 @@ Plus any of the above with a domain name substituted for the IP address (e.g., foo.bar.com instead of 168.192.1.1). */ - if (preg_match("/^(\S+(?:\.\S+)+) - - \[(.*?)\] \"GET \/(?:archive\/0{1,8})?(\d{1,4}).*? HTTP\/1..\" 200 .*?(\"[^\"]+\")?$/i",$buffer,$matches)) + if (preg_match("/^(\S+(?:\.\S+)+) - - \[(.*?)\] \"GET \/(?:archive\/0+)?(\d+).*? HTTP\/1..\" 200 .*?(\"[^\"]+\")?$/i",$buffer,$matches)) { $counter++; $country_code = ''; @@ -578,7 +578,7 @@ // NJS 2005-11-25 Added regexp for EPrints short URLs. // NJS 2007-01-31 Refactored into one regexp for both styles. - if (preg_match("/GET \/(?:archive\/0{1,8})?\d{1,4}\/\d\d\//i",$buffer)) { + if (preg_match("/GET \/(?:archive\/0+)?\d+\/\d+\//i",$buffer)) { $view_type = "download"; } else { $view_type = "abstract";