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

BM-2RQ66 - MICRO SWITCH HONEYWELL - SWITCH SNAP ACTION SPDT 15A 125V
$13.99
BM-2RQ66 - MICRO SWITCH  HONEYWELL - SWITCH SNAP ACTION SPDT 15A 125V pictureIndustrial Metal sign (BOTH SIDES OF SWITCH MAY BE ALIVE) Western Electric
$19.99
Industrial Metal sign (BOTH SIDES OF SWITCH MAY BE ALIVE) Western Electric  picture148166 Parts Only, Pollak 123455 Key Switch-NO Key (Never Used)
$20.07
148166 Parts Only, Pollak 123455 Key Switch-NO Key (Never Used) pictureNew Omron ZC-W155 SWITCH LIMIT HINGE LEVR SPDT 10A
$59.99
New Omron ZC-W155 SWITCH LIMIT HINGE LEVR SPDT 10A pictureXH-W3001 12V Digital Control Microcomputer Thermostat Switch Temperatural Ins...
$7.68
XH-W3001 12V Digital Control Microcomputer Thermostat Switch Temperatural Ins... picture






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