Solved

Validate UK Mobile Phone Numbers

Posted on 2003-12-08
3
728 Views
Last Modified: 2011-10-03
Hi,

Does anybody know of an algorithm with which to validate UK mobile phone numbers? I think numbers from different operators have different prefixes, but is there a definitive way to say number x is valid, but number y isn't (e.g. as you can with a credit card)?

And on a related note, is it possible to 'sniff' whether a mobile phone would accept MMS messages by interacting with it in some way (excluding sending an sms saying 'D U WANT PICTURES?')

A cheeky double-header, but interested to hear what yout think.

Cheers
subtext101
0
Comment
Question by:subtext101
3 Comments
 
LVL 35

Assisted Solution

by:YZlat
YZlat earned 100 total points
ID: 9897884
give an example
0
 
LVL 16

Accepted Solution

by:
jaysolomon earned 165 total points
ID: 9897953
WE can write a reg exp for the phone, no problem

but we need to no the pattern

US example
(123)456-7890 or (123) 456-7890
0
 
LVL 1

Author Comment

by:subtext101
ID: 9942085
Hi Folks,
It was the pattern I was after.  I found it on Oftel's website - it is:

44 (0) [77-79] XXXX XXXX

They have a list, so you can determine which network just from the phone number.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question