From: Jakub Narebski Date: Fri, 25 Mar 2011 17:47:38 GMT Subject: Re: [PATCH (BUGFIX)] gitweb: Fix handling of fractional timezones in parse_date Message-ID: <201103251847.39881.jnareb@gmail.com> In-Reply-To: <7v8vw36s0r.fsf@alter.siamese.dyndns.org> Junio C Hamano wrote: > Kevin Cernekee writes: > > > It's just a matter of personal preference, but I would find this > > regexp slightly easier to read: > > > > + ($tz =~ m/^([+\-])([0-9]{2})([0-9]{2})$/); > > I'd say "^([-+])(\d\d)(\d\d)$" makes it the most clear. But what does 'digit character' mean? Is "\d" Unicode-aware, because if it is it might match other digits than 0-9? #perl says: ShadeHawk: hi. ShadeHawk: \d matches Unicode digits in unicode contexts I think. ShadeHawk: like the ones used for Written Arabic. ShadeHawk: let's see. perlbot: eval: ["٣" =~ /\d/ ? "Match" : "Nomatch"] rindolf: ["Match"] Yay! That's three in http://en.wikipedia.org/wiki/Hindu%E2%80%93Arabic_numeral_system Anyway gitweb uses \d in various regexps, so it shouldn't be worse than it is now. [...] > Care to re-roll the patch? Will do. -- Jakub Narebski ShadeHawk on #git and #perl Poland