Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: [PATCH (BUGFIX)] gitweb: Fix handling of fractional timezones in parse_date

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:50:54

Possibly related (same subject, not in this thread)

Junio C Hamano wrote:
Kevin Cernekee [off-list ref] writes:
quoted
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:

<rindolf> ShadeHawk: hi.
<rindolf> ShadeHawk: \d matches Unicode digits in unicode contexts I think.
<rindolf> ShadeHawk: like the ones used for Written Arabic.
<rindolf> ShadeHawk: let's see.
<rindolf> perlbot: eval: ["٣" =~ /\d/ ? "Match" : "Nomatch"]
<perlbot> rindolf: ["Match"]
<rindolf> Yay!
<rindolf> 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help