On Tue, Apr 13, 2010 at 5:19 PM, Rui Miguel Silva Seabra <r...@1407.org>wrote:

> >> len(+972-3-1234567) > len(03-1234567)
> >> 0097231234567 > 031234567
> >
> > Those two are the same number! And with your methods it's not.
>
>
> Well, I don't know what about those '-', I can't use that on my Nokia. I
> don't know if -3 would have to be introduced as 03.
>

- are just for readability, I'm talking about 0097231234567 and 031234567,
these two are are the same phone number (0 being national prefix).

>
> Of course the numbers have to be normalized to a string of digits only,
> in order to do any sane comparison.
>

See what I said above.

>
> For some reason you're not noticing that, obviously, neither length/size
> or matching can be done in separate. Of course using them as a single
> vector of matching would be idiotic.
>
> Most of these things are solvable by simple regex matching.
>

Duh, that's what we are doing, we just follow the "rules" when we do it.
(i.e adding/removing prefixes, etc).

>
> This only doesn't work if you think of having the universe of phone
> numbers in your address book.
>
> > Comparing in a way which is against standards is hackish.
>
> What standards?
>

Phone number structure standards, you can get more info here:
http://tools.ietf.org/html/rfc3966#section-5.1
(although it's not the "ultimate guide" it does provide good info.)
-- 
Tom.
_______________________________________________
Shr-devel mailing list
Shr-devel@lists.shr-project.org
http://lists.shr-project.org/mailman/listinfo/shr-devel

Reply via email to