BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 02-23-2010, 03:08 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 9000
Carrier: Airtel
Posts: 81
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to recognize mobile number in a given text?

Please Login to Remove!

I want to extract valid(on the basis of format) mobile numbers from a text.

e.g. I/O some text (987) 456 7890, (987)-456-7890 again some text

O/P 9874567890 9874567890

problem is, there are many valid mobile formats in all over world like.

Code:
text = "Denmark 11 11 11 11, 1111 1111 "
        // + "Germany 03333 123456, +49 (3333) 123456 "
        // + "Netherlands + 31 44 12345678 Russia +7(555)123-123 "
        // + "spain 12-123-12-12 switzerland +41 11 222 22 22 "
        // + "Uk (01222) 333333 India +91-12345-12345 "
        // + "Austrailia (04) 1231 1231 USA (011) 154-123-4567 "
        // + "China 1234 5678 France    01-23-45-67-89 "
        // + "Poland (12) 345 67 89 Singapore 123 4567 "
        // + "Thailand  (01) 234-5678, (012) 34-5678 "
        // + "United Kingdom 0123 456 7890, 01234 567890 "
        // + "United States (987) 456 7890, (987)-456-7890+ etc."
How to cover all mobile formats?
min and max length of the mobile numbers(with or without country code)?
how to recognize that mobile number has country code or not?
__________________
blog.vimviv.com
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

SIEMENS 6SN1145-1BA02-0CA1 (Used, Cleaned, Tested 2 year warranty)
$4523.99
SIEMENS 6SN1145-1BA02-0CA1 (Used, Cleaned, Tested 2 year warranty) pictureMC Technologies MC55iw Terminal+MC0114009 Stations-Antenna (5m)+Siemens GSM AS02
$18.0
MC Technologies MC55iw Terminal+MC0114009 Stations-Antenna (5m)+Siemens GSM AS02 pictureNEW SIEMENS 3RT1056-6AF36 CONTACTOR 3RT10566AF36
$350.0
NEW SIEMENS 3RT1056-6AF36 CONTACTOR 3RT10566AF36 pictureNEW SIEMENS COM16 MODBUS MODULE WLCM16MD 3WL9111-1AT15-0AA0
$125.95
NEW SIEMENS COM16 MODBUS MODULE WLCM16MD 3WL9111-1AT15-0AA0 picture3RG4012-0AG33 SIEMENS Inductive Proximity Switch
$27.95
3RG4012-0AG33 SIEMENS Inductive Proximity Switch picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.