diff options
author | matthew <matthew> | 2009-01-01 01:21:17 +0000 |
---|---|---|
committer | matthew <matthew> | 2009-01-01 01:21:17 +0000 |
commit | a79e37f47055184dbbf138fac762fce54d9ea9d1 (patch) | |
tree | 05dcd225653bd58469ed2c4be70c0b73bda88f2b | |
parent | 386d1ce4bbc1fd5a53b0bb22873bd8b00b6cda91 (diff) |
Better comma-adding regex; happy new year!
-rwxr-xr-x | web/index.cgi | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/index.cgi b/web/index.cgi index 820f86d5f..04589959c 100755 --- a/web/index.cgi +++ b/web/index.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: index.cgi,v 1.236 2008-12-23 23:29:47 matthew Exp $ +# $Id: index.cgi,v 1.237 2009-01-01 01:21:17 matthew Exp $ use strict; use Standard; @@ -112,7 +112,7 @@ Get FixMyStreet on your iPhone</a> $out .= '<p id="error">' . $error . '</p>' if ($error); my $fixed = Problems::recent_fixed(); my $updates = Problems::number_comments(); - $updates =~ s/(\d\d\d)$/,$1/; + $updates =~ s/(?<=\d)(?=(?:\d\d\d)+$)/,/g; my $new = Problems::recent_new('1 week'); my $new_text = 'in past week'; if ($q->{site} ne 'emptyhomes' && $new > $fixed) { |