When a carrier runs out of one set of numbers – like, sadly, premium-rate – they simply introduce a new prefix.
There are several procedures (each with corresponding function wrappers): Where 'some Regex' is the regular expression matching the format you are looking for.
This site has some matches on it, but I'm not sure how well they work since I'm not familiar with UK numbers whatsoever.
We can look up the countries which use a particular dialing code: /** * Gets the dialing codes for a given country * * @param string country The two-character country code * @return array An array of strings representing the dialing codes */ get Codes : function(country) You’ll find these functions packaged up as a module, along with unit tests, in the repository that accompanies the article.
Even international dialing codes, however, aren’t as straightforward as you may think.
UK Telephone Number Validation - Java Script, VBScript, & PHP I don't knwo the exact rules that define a valid UK phone number and as you have not provided any rules to validate a Phone no, I just picked rules listed in the url provided by Colin Pickard in his answer.