in reply to Trim Phone Numbers

Just a small note: Phone numbers are very different from region to region, and simply cutting off some digits here and there will likely damage them. The US notation 555-1234-567 looks completely strange to someone living in Europe, and vanity numbers like 555-SHOE-SHOP were nearly unknown until a few years ago. Not that we europeans would share a common notation. The german standards recommend to have pairs of digits, right-aligned, with private extensions indicated by a dash, and the long distance prefix either in brackets or with a slash: 0 12 34 / 5 67 89-1 23. For regional phone numbers, the prefix is usually omitted. Other countries group three digits, or don't group at all, some have no concept of long-distance calls. Various characters are used to separate digit groups, like white space, dots, slashes, dashes, and brackets. So, any random group of up to 13(? - ITU limit) digits with optional interpunctation could be a valid phone number. When it comes to vanity numbers, things get even worse.

Several libraries that pretend to be able to handle phone numbers can in fact handle only US phone numbers and fail miserably when they are confronted with non-US phone numbers.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)