Re: Retrieving an area code from a telephone number
- From: Christian Gollwitzer <Christian.Gollwitzer@xxxxxxxxxxxxxxx>
- Date: Fri, 04 Apr 2008 13:54:36 +0200
Andrew 2006 schrieb:
I'd like to implement a function that given a telephone number,
returns the area code.
E.g.
doExtract ("02084279274") = 020 # London
doExtract ("01697478288") = 016974 # Wigton, Cumbria
doExtract ("01189472872 ") = 0118 # Reading
doExtract ("01438311919") = 01438 # Stevenage
It appears that the only way to retrieve the correct area code would
be to check the numbers against a database of all current UK telephone
area codes.
That is the way to go. You should use a trie to store the area codes, it will probably provide the fastest possible decoding.
Christian
.
- Follow-Ups:
- Re: Retrieving an area code from a telephone number
- From: Clive D. W. Feather
- Re: Retrieving an area code from a telephone number
- References:
- Retrieving an area code from a telephone number
- From: Andrew 2006
- Retrieving an area code from a telephone number
- Prev by Date: China *** Stainless Steel Pendant KP0956
- Next by Date: HANDFUL INCOME TO YOUR BANK ACCOUNT .LAST WEEK I EARN $2,00,000 WITHOUT RISK. THE PROGRAMME INVITES YOU TOO.THE LINK
- Previous by thread: Retrieving an area code from a telephone number
- Next by thread: Re: Retrieving an area code from a telephone number
- Index(es):