phone-number

A comprehensive regex for phone number validation

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following: 1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901 I'll answer with my current attempt, b...

US Phone Number Verification

I have a website form that requires a US phone number input for follow up purposes, and this is very necessary in this case. I want try to eliminate users entering junk data 330-000-0000. I have seen some options of third parties that validate phone numbers for you, however idk if that is the best option for this situation. However if yo...

What is the best way for converting phone numbers into international format (E.164) using Java?

What is the best way for converting phone numbers into international format (E.164) using Java? Given a 'phone number' and a country id (let's say an ISO country code), I would like to convert it into a standard E.164 international format phone number. I am sure I can do it by hand quite easily - but I would not be sure it would work c...

Phone number normalization: Any pre-existing libraries?

I have a system which is using phone numbers as unique identifiers. For this reason, I want to format all phone numbers as they come in using a normalized format. Because I have no control over my source data, I need to parse out these numbers myself and format them before adding them to my DB. I'm about to write a parser that can read ...

Is there pseudocode for UK address or phone number validation?

Do you have pseudocode for field validation of the following items in the UK? I am from the USA, so I only know the ones in the USA right now. Address Line 1 Phone Number Mobile Number (in case they have a special rule for this, which they might not) Post Code ...

How do you store cell phone numbers in a database?

With the age of text messages and things like that, what's a good way to store phone numbers in a database? In the USA, text messages are handled by phone numbers but in other countries I hear they use email addresses so I guess there needs to be a way to differentiate between countries that use cell phone numbers as their address. A...

Skype taking over urls

Hi We have some issues in our application with skype taking over some of our urls, replacing them with a skype plug in that enables you to start calls. Looks like skype thinks they are phone numbers. I was wondering if there are some way to mark our urls such that skype doesn't think they are phone numbers? Its described here http://ww...

Phone numbers to links in Python

I'm working a piece of code to turn phone numbers into links for mobile phone - I've got it but it feels really dirty. import re from string import digits PHONE_RE = re.compile('([(]{0,1}[2-9]\d{2}[)]{0,1}[-_. ]{0,1}[2-9]\d{2}[-_. ]{0,1}\d{4})') def numbers2links(s): result = "" last_match_index = 0 for match in PHONE_RE.f...

NSNumber storing float. Please NO scientific notation!!

(iPhone question) My code looks like this NSNumber *inputToNumber = [NSNumber numberWithFloat:[textField.text floatValue]]; the value from the textfield is actually a telephone number. It's stored in NSNumber as an annoying (2.0)78966e+08 How can I just get NSNumber to store it as 0207896608? Thanks dan ...

Converting a normalized phone number to a user-friendly version

In my C# application, I use a regular expression to validate the basic format of a US phone number to make sure that the user isn't just entering bogus data. Then, I strip out everything except numbers, so this: (123) 456-7890 x1234 becomes 12345678901234 in the database. In various parts of my application, however, I would l...

Is there an all-countries phone number validator for Perl?

I am doing web development with Perl. I need to do phone number validation for all countries. Is there open source Perl module that can do the following? For example: country = Malaysia, if user input phone number = +60127008007, after validate, it return this is a valid mobile number in Malaysia, where: In local Malaysia, we call: 0127...

any way to "ping" a phone number?

We have a customer who wants to go through their CRM database and somehow determine phone numbers which are valid, without actually having someone sit there and try calling them all. Is there any way to do something akin to a "ping" on a phone number (including landlines)? ...

Remove all but numbers from NSString

I have an NSString (phone number) with some parenthesis and hyphens as some phone numbers are formatted. How would I remove all characters except numbers from the string? ...

How to mark-up phone numbers?

Hi, I want to mark up a phone number as callable link in an HTML document. I have read the microformats approach, and I know, that the tel: scheme would be standard, but is quite literally nowhere implemented. Skype defines, as far as I know, skype: and callto:, the latter having gained some popularity. I assume, that other companies h...

Retrieving mobile (cell) phone number over WAP

Hi, First of all i don't really know much, if anything, about mobile/cell phone programming, i was just wondering about this. Is it possible for an ASP.net mobile page to retrieve a phone number using WAP? The obvious use would be authenticating users by phone number. If it is possible, i am guessing it would be pretty insecure. Is thi...

ASP Regular Expression for UK Telephone format in VB.net

Hi, I want regular expression validator for my telephone field in VB.net. Please see the requirement below: Telephone format should be (+)xx-(0)xxxx-xxxxxx ext xxxx (Optional) example my number would appear as 44-7966-591739 Screen would be formatted to show +44-(0)7966-591739 ext Please suggest. Best Regards, Yuv ...

Regular expression to match phone number?

I want to match a phone number that can have letters and an optional hyphen: This is valid: 333-WELL This is also valid: 4URGENT In other words, there can be at most one hyphen but if there is no hyphen, there can be at most seven 0-9 or A-Z characters. I dont know how to do and "if statement" in a regex. Is that even possible? ...

Phone Number Validator/Filter using jQuery or Zend Form?

I'm thinking about adding some validation/filtering to the phone number field of my Zend Framework application. Not sure if this is something I should do or not. I thought it might be helpful for users to have such a feature so I could enforce a particular display format. I'm not sure if the formatting of the phone number should be stor...

mysql datatype for telephne number and address

Hello, I want to input telephone number in a form, including country code, extension create table if not exists employee( ` country_code_tel int(11), tel_number int(10), extension int(10), mobile bigint(20) ); If tel_number is larger than 15 bit, which datatype can i use, i'd...

Permutations for digits represented by Phone Number

Guys, I have an interview in 2 days and I am having a very hard time finding a solutions for this question: What I want to do is .. for any phone number .. the program should print out all the possible strings it represents. For eg.) A 2 in the number can be replaced by 'a' or 'b' or 'c', 3 by 'd' 'e' 'f' etc. In this way how many possi...