format phone number

villson7

Member
Joined
Dec 14, 2006
Messages
15
Programming Experience
Beginner
Greeting everyone, i have develop a program that will allow user key in the phone number according to these format: ########## where first two digit represent country code and the remain are the mobile number or phone number.

Q1: can i make the program automactically change the format phone number to ########## whenever which user has entered different format. example when user key in (65) 91234567 , 65-91234567 0r 65 91234567 , it will change it to 6591234567.

Q2: can the program build to support many phone numbers when user key in over 2 phone numbers in different format, it will still change to original form.
example all numbers in the line which contain 65-91234567, (65)97654321, 65 93214567, 65976 51234 to 6591234567, 6597654321, 6593214567 and 6597651234.

Q3: can i also counting how many numbers that user has key in?
example ,6591234567,,6597654321, 6593214567, consider count as 3 numbers
 
VB.NET:
Dim myString AsString = "12345,,,,abikl:8900,,^&8999,,675,,12345"
Dim delimStr AsString = ","
Dim delimiter AsChar() = delimStr.ToCharArray()
Dim str AsString() = Split(myString, delimiter)
Dim aStr AsString
str=DeleteDoubleElement(str)
ForEach aStr In str
If aStr.Trim <> String.Empty and isNumeric(aStr) Then MsgBox(aStr)
Next
 
Back
Top